Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA: Check When Cell Changes 1

Status
Not open for further replies.

TonyRosen

Programmer
Jul 28, 2003
108
US
How do I use VBA etc.. to determine when a specific cell changes and then run a macro if it does?
 
Have a look at the Change event of the Worksheet object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah ... tried that ... it won't fire off. No sweat - I'll go off surfing for an answer.
 
Yea! I'm a superstar:

Sub Worksheet_Change(ByVal Target As Range)
Dim WatchRange As Range
Dim IntersectRange As Range
Set WatchRange = Range("A1:A10")
Set IntersectRange = Intersect(Target, WatchRange)
If IntersectRange Is Nothing Then
'Do Nothing Spectacular
Else
Call MyMacro
End If
End Sub

 
Yea! I'm a superstar:

Yes, its amazing what you can achieve by following someone else's answer to your question!!

Have a star PHV
 
tomreid, i came up with my answer before reading PHV's response ... so, I'm still a superstar ... HA!
 
Actually, PHV gave you the answer. You said you tried his solution but couldn't get it to work. Then you came back and said you found the solution - which you had already been ... sigh OK you ARE a superstar, well done !!
 
Good grief ... nevermind .... now I remember why i stopped coming around here .....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top