ukyank
09-10-2009, 01:35 AM
Sorry for asking a very dumb question but I can't seem to get this very basic example to work. I copied it from Mircosoft's help but no luck I dont get a msgbox:
Private Sub Worksheet_Change(ByVal Target as Range)
Dim keyCells as Range
Set keyCells = Range ("D5:E11")
If Not Application.Intersect(keyCells , Range(Target.Address)) is Nothing Then
Msgbox "Cell: " & Target.Address & " has changed"
End If
Sorry I am totally new to VBA in Excel and am just trying to get this working so I can expand and use it for an attendance sheet
Private Sub Worksheet_Change(ByVal Target as Range)
Dim keyCells as Range
Set keyCells = Range ("D5:E11")
If Not Application.Intersect(keyCells , Range(Target.Address)) is Nothing Then
Msgbox "Cell: " & Target.Address & " has changed"
End If
Sorry I am totally new to VBA in Excel and am just trying to get this working so I can expand and use it for an attendance sheet