View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Auto Run Excel macro subject to condition

Hi

Look at the change event
http://www.cpearson.com/excel/events.htm

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = Range("A2").Value Then runmymacro
End Sub

Sub runmymacro()
MsgBox ""
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Warrior1800" wrote in message
...

Hello all,

This question is to all the Sultans of Excel.....

I s there a way I can program a macro to auto run, subject to a
condition being true...something like,

Whenever the condition, ---If Range("a1") = Range("a2")--- is true a
specified Macro should run automatically.


--
Warrior1800
------------------------------------------------------------------------
Warrior1800's Profile: http://www.excelforum.com/member.php...o&userid=25518
View this thread: http://www.excelforum.com/showthread...hreadid=389570