📊 VBA (Excel)
Apply Disable Lock Screen Notifications (VBA)
Stops app notifications from appearing on the lock screen. Applied via WScript.Shell.RegWrite from VBA.
DisableLockScreenNotificationsRegSet.bas
Attribute VB_Name = "DisableLockScreenNotificationsRegSet"
Option Explicit
Public Sub DisableLockScreenNotificationsRegSet()
Dim wsh As Object
Dim regPath As String
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PushNotifications\LockScreenToastEnabled"
wsh.RegWrite regPath, 0, "REG_DWORD"
MsgBox "Disable Lock Screen Notifications applied." & vbCrLf & regPath, vbInformation
End Sub