📊 VBA (Excel)

Apply Show Recycle Bin Icon on Desktop (VBA)

Adds the Recycle Bin icon back to the desktop. Applied via WScript.Shell.RegWrite from VBA.

By WindowsScripting.com · 499 B
ShowRecycleBinOnDesktopRegSet.bas
Attribute VB_Name = "ShowRecycleBinOnDesktopRegSet"
Option Explicit

Public Sub ShowRecycleBinOnDesktopRegSet()
    Dim wsh As Object
    Dim regPath As String

    Set wsh = CreateObject("WScript.Shell")
    regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{645FF040-5081-101B-9F08-00AA002F954E}"

    wsh.RegWrite regPath, 0, "REG_DWORD"

    MsgBox "Show Recycle Bin Icon on Desktop applied." & vbCrLf & regPath, vbInformation
End Sub