📊 VBA (Excel)

Check Show Recycle Bin Icon on Desktop Registry Value (VBA)

Reads the Show Recycle Bin Icon on Desktop registry value via WScript.Shell.RegRead and reports it in a message box — no PowerShell or reg.exe needed.

By WindowsScripting.com · 725 B
ShowRecycleBinOnDesktopRegCheck.bas
Attribute VB_Name = "ShowRecycleBinOnDesktopRegCheck"
Option Explicit

Public Sub ShowRecycleBinOnDesktopRegCheck()
    Dim wsh As Object
    Dim regPath As String
    Dim value As Variant

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

    On Error Resume Next
    value = wsh.RegRead(regPath)
    On Error GoTo 0

    If IsEmpty(value) Then
        MsgBox "Value not set:" & vbCrLf & regPath, vbExclamation, "Show Recycle Bin Icon on Desktop"
    Else
        MsgBox "Show Recycle Bin Icon on Desktop" & vbCrLf & regPath & " = " & value, vbInformation
    End If
End Sub