Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can you call a macro as in an IF statement
As the subject implies, I want to know if I can call a macro as a result of true logic in an IF statement. If not, how do you go about calling a macro as a result of conditional statements? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can you call a macro as in an IF statement
A macro can only be called with a macro
sub gg() if range("a1")=1 then call mymacro end sub -- Don Guillett SalesAid Software "kls" wrote in message ... As the subject implies, I want to know if I can call a macro as a result of true logic in an IF statement. If not, how do you go about calling a macro as a result of conditional statements? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can you call a macro as in an IF statement
in VBA
If condition then mymacro End if in A worksheet cell, create a userdefined function =if(condition,Trigger(),"") Public Function Trigger() Trigger = "ABCD" End Function however, Trigger can only return a value. It can not change other aspects of the worksheet. If you need to do things like that, use the calculate or the change event. -- regards, tom Ogilvy "kls" wrote in message ... As the subject implies, I want to know if I can call a macro as a result of true logic in an IF statement. If not, how do you go about calling a macro as a result of conditional statements? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call Macro | Excel Discussion (Misc queries) | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
macro call | Excel Discussion (Misc queries) | |||
How to call a macro in an XLA add-in | Excel Discussion (Misc queries) |