Return to Snippet

Revision: 22002
at December 28, 2009 13:02 by derekholmes


Initial Code
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$D$8" Or Target.Address = "$D$7" Or Target.Address = "$D$9" Then
        Call Module1.AutoGoalSeek
    End If
End Sub

Initial URL
http://www.excelforum.com/excel-programming/629622-run-macro-everytime-cell-content-changes.html

Initial Description
The easy way to set this up is to go to the macro window by pressing alt+F11.
Select the sheet from left panel. there will be two drop down. from the left drop down select worksheet and from right drop down list select the event 'change'.

Initial Title
Excel: Run Macro on Cell Change

Initial Tags
excel

Initial Language
Visual Basic