Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
can I run a macro from an if statement, i.e if this then run macro otherwise do nothing?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, Of Course!
try this eg to see: Sub Eg1() MsgBox "Hello" End Sub Sub Eg2() MsgBox "Bye-Bye" End Sub Sub eg_Total() If Range("A1") = Range("B1") Then Call Eg1 Else Call Eg2 End If End Su -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rebecca,
No a macro cannot be run from an if statement. You could, however, almost certainly get the functionality you want using an event procedure, If you are not familiar with event procedures, you might want to look at Chip Pearsons page on the subject: http://www.cpearson.com/excel/events.htm In any case, if you care to explain what it is that you would like to achieve, I am sure that someone will assist you with a suitable solution. --- Regards, Norman "Rebecca" wrote in message ... can I run a macro from an if statement, i.e if this then run macro otherwise do nothing? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statements in macros | Excel Discussion (Misc queries) | |||
How can I use wildcards in IF statements and Macros | Excel Discussion (Misc queries) | |||
IF Statements (Mutliple Statements) | Excel Worksheet Functions | |||
How do i start Macros using IF statements? | Excel Discussion (Misc queries) | |||
True / false statements in Macros | Excel Programming |