SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : Metastock 6.0 for Window

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Bill Scoggin who wrote (3701)10/24/2000 12:53:48 PM
From: Michael Olds  Read Replies (1) of 4056
 
I questioned Steve Yandel on www.pcnineoneone.com as follows:

The answer is a qualified yes. A macro is a visual basic subroutine. You can call one macro from inside another macro. The key is how and when you launch the routine that contains the if statement. The ideal situation is where you trigger the if containing routine by some event, it tests the condition and either runs the other macro or shuts down.

Thanks for this Steve, I think the guy wants to set up an IF () function as a formula (or part of one) in a cell, not as a part of another macro.

i.e.: IF (B1>B2,run Macro1,0)

I'd have to test and see if Excel's built in "If()" function will accept a subroutine as an argument. If not, a custom function using an if statement could easily be created so the answer is still yes.

If you want to get into it more, go to PC911 and in the forum section look for "Excel Macro" discussion.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext