How to call a procedure when a cell value changes?
You have to catch the change of the precednts of the formula. You can not
directly catch the change of the calculated cell. Depending on what the
prcidents of the formula looked like I might use union and intersect to make
things easy something like... (Where the precidents are B1 and B48)
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Union(Range("B48"), Range("B1"))) Is Nothing Then
MsgBox "Tada"
End If
End Sub
As for the dialogues it depends what they are but
Application.DisplayAlerts = False
Application.DisplayAlerts = True
will turn alerts on and off if that is what you meant by dialogues.
--
HTH...
Jim Thomlinson
"Bojana" wrote:
Hi,
I have a formula in cell B49 that calculates based on certain inputs.
How can I trigger a procedure to fire when the value of calculation in B49
changes?
Also, how can I supress a dialog in a macro?
Thanks in advance,
Bojana
|