View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Simple conditional macro

Sub CallOneOrTheOther()
if Range("A1").Value 100 then
macro1
else
macro2
End if
End Sub

Sub Macro1()
msgbox "Value is greater than 100"
End Sub

Sub Macro2()
msgbox "Values is less than or equal to 100"
End Sub

--

Regards,
Tom Ogilvy

"Boz.theale" wrote in message
...
As a novice user, can anyone please supply me with VB code to enable me
to construct a macro that calls one of two other macros dependent on
the value of a particular worksheet cell

Many thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/