View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
tkraju via OfficeKB.com tkraju via OfficeKB.com is offline
external usenet poster
 
Posts: 109
Default run macro on a condition

Thank you Per Jessen,
It worked.Thank you so much...

Per Jessen wrote:
Hi TK

Use an event code to trap changes in your worksheet. This code will only
fire if you enter a value in your worksheet not if the change is due to a
calculation.

The code is to be pasted into the code sheet for the desired worksheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$G$1" Then
Call Macro1
End If
End Sub

Regards,
Per

In my w/sheet I have number of calculated fields basing on formulas
linkedto
this sheet as well as other sheets of same w/book.I have 3 macros also.I
would like to run a macro if a particular cell value in w/sheet
changes.Say ,
If whenever I changescell G1 value macro1 should run.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200904/1