Excel macro activation.

  • Thread starter Thread starter Dave Ramage
  • Start date Start date
D

Dave Ramage

Use the Change event of the worksheet, like this:

Private Sub Worksheet_Change(ByVal Target As Range)
'is changed cell in a certain region?
If Union(Range("A1:G10"), Target).Address _
= "$A$1:$G$10" Then
If Target.Cells(1).Value = "B" Then
MsgBox "Cell changed to B"
'other stuff here!
End If
End If
End Sub

Add the above code to the worksheet module.

Cheers,
Dave.
 
Back
Top