Thread: Run macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Run macro

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


"Ed" wrote in message
...
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