Run macro

E

Ed

Hello I have the following macro:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub


How do I set it up to run the macro "Calculation" after I changed the value
in D9 rather than when I select cell D9?

thanks
 
B

Bernie Deitrick

Ed,

Use the change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub

HTH,
Bernie
MS Excel MVP
 
E

Ed

That was simple... thanks!!



Bernie Deitrick said:
Ed,

Use the change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub

HTH,
Bernie
MS Excel MVP
 
Top