I have put the following code in Sheet1 (right click code) or This Workbook Code or Modules - Module 1 and in none of these cases did it run in response to selection or value changes entered on the workbook spread sheet. I checked (Immediate window) that Application.EnableEvents is true. I closed the Excel, rebooted and still it doesn't work. Using EXCEL365 on Windows 11 Have spent many hours going round and round this. Any insights will be appreciated.
Option Explicit
Sub WorkSheett_Change(ByVal Terget As Range)
Application.EnableEvents = False
If Target.Address = "D1" Then
MsgBox ("GotIt")
Else
MsgBox ("Not It")
End If
Application.EnableEvents = True
End Sub
Option Explicit
Sub WorkSheett_Change(ByVal Terget As Range)
Application.EnableEvents = False
If Target.Address = "D1" Then
MsgBox ("GotIt")
Else
MsgBox ("Not It")
End If
Application.EnableEvents = True
End Sub