run macro in formula with "if" condition

G

Gord Dibben

Only by using worksheet event code like

Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("A1")
If .Value = 123 Then
Call macroname
End If
End With
stoppit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP


On Wed, 23 Sep 2009 22:20:03 -0700, wg <[email protected]> wrote:
 
Top