View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default triggering macros

right click on your sheet tab, select view code and use the following event
handlers


Private Sub Worksheet_Calculate()
'Do Something
End Sub


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
'Do Something
End If
End Sub

Of course, you will need to change the above cell address from $A$1 to
whatever you need.

If your calculation is set to automatic, it should not necessary to
recalculate the worksheet after the Worksheet_Change event (and I believe the
worksheet will recalculate before the Workhseet_Change event fires). If you
need to recalculate, you can use Target.Parent.Calculate or
Application.CalculateFull (to recalculate the entire workbook).




"gvm" wrote:

I have two macros. I need one to run each time the spreadsheet finishes
recalculation. I need the other one to run each time a particular cell is
changed and I need the spreadsheet to recalculate once it has finished. How
do I do these please?
thanks
Greg