F Frank Kabel Apr 8, 2004 #2 Hi have a look at the Call method in the Excel vBA help or just simply enter the macro name of your sub macro in your main macro: sub main_macro() 'do something other_macro 'do something more end sub sub other_macro() 'do now something completely different end sub
Hi have a look at the Call method in the Excel vBA help or just simply enter the macro name of your sub macro in your main macro: sub main_macro() 'do something other_macro 'do something more end sub sub other_macro() 'do now something completely different end sub
G Guest Apr 8, 2004 #3 If you mean something like this, then yes, else please explain further Sub StartHere( RunOtherMacr End Su Sub RunOtherMacro( msgbox "Got Here End Su ----- ERH wrote: ---- It is possible to run a macro with in a macro in Excel 2000
If you mean something like this, then yes, else please explain further Sub StartHere( RunOtherMacr End Su Sub RunOtherMacro( msgbox "Got Here End Su ----- ERH wrote: ---- It is possible to run a macro with in a macro in Excel 2000
G Guest Apr 8, 2004 #4 Thanks Only want other macro if certain condition is met in an IF statement, if condition not met, would want macro to stop there.
Thanks Only want other macro if certain condition is met in an IF statement, if condition not met, would want macro to stop there.
B Bob Phillips Apr 8, 2004 #5 Are you sure you are up to this? Sub StartHere() If Range("C1").Value =1 Then RunOtherMacro End If End Sub Sub RunOtherMacro() msgbox "Got Here" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)
Are you sure you are up to this? Sub StartHere() If Range("C1").Value =1 Then RunOtherMacro End If End Sub Sub RunOtherMacro() msgbox "Got Here" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)
F Frank Kabel Apr 8, 2004 #6 Hi still not that much information but try something like sub main_macro() 'do something If activesheet.range("A1").value = "Go" then other_macro end if 'do something more end sub sub other_macro() msgbox "cell A1 contains 'Go'" 'do now something completely different end sub
Hi still not that much information but try something like sub main_macro() 'do something If activesheet.range("A1").value = "Go" then other_macro end if 'do something more end sub sub other_macro() msgbox "cell A1 contains 'Go'" 'do now something completely different end sub
E ERH Apr 21, 2004 #7 Thanks. Hope you are still around after this long delay. Have tried your advice below. However, keep getting message "Sub or Function not defined" for RunOtherMacro. Tried renaming other macro to OtherMacro but no joy. Any thoughts/help?
Thanks. Hope you are still around after this long delay. Have tried your advice below. However, keep getting message "Sub or Function not defined" for RunOtherMacro. Tried renaming other macro to OtherMacro but no joy. Any thoughts/help?