Excel macro activation.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top