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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Macro when a Cell Changes in Excel

Status
Not open for further replies.

cyork

MIS
Apr 4, 2001
34
0
0
CA
Is there a way to have a macro execute everytime the value in a given cell is changed???

Thanks,

Chris
 
Use the Worksheet_Change event to monitor your target cells. Then, if the target cell is changed, just call your macro.
 
You can use the Worksheet_Change event. In the example
below, "yourProcedure" is executed whenever cell A1 is
changed.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = Range("A1").Address Then
Call yourProcedure
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top