Change Cell Event

  • Thread starter Thread starter snax500
  • Start date Start date
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target = ActiveSheet.Range("$A$2") Then
MsgBox "Hello"
End If

End Sub

substitute the msgbox with your code.......
hope that helps!
:)
susan
 
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("A2")
If .Value <> "" Then
MsgBox "A2 was just changed"
End If
End With
stoppit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste into that sheet module. Edit to suit.


Gord Dibben MS Excel MVP
 
Back
Top