📊 VBA (Excel)
Apply Enable Dark Mode (VBA)
Switches File Explorer and other system surfaces to dark mode. Applied via WScript.Shell.RegWrite from VBA.
DarkModeRegSet.bas
Attribute VB_Name = "DarkModeRegSet"
Option Explicit
Public Sub DarkModeRegSet()
Dim wsh As Object
Dim regPath As String
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme"
wsh.RegWrite regPath, 0, "REG_DWORD"
MsgBox "Enable Dark Mode applied." & vbCrLf & regPath, vbInformation
End Sub