macro to run macros

  • Thread starter Thread starter wamstrdad
  • Start date Start date
W

wamstrdad

I would like to develop a macro to run multiple macros. for example, I have 5
macros (VBA) for a workbook. How do I write a macro that runs all of the
macros? I cannot combine them into 1 macro because they exceed the memory
limit.
 
I guess the real question is why you exceed the memory limit......
Even if you call 5 macro's from a header macro, the macro's will still be in
memory even if you close the workbook that the macro is attached to. The
macro's only disappear from memory when you close xls.

So, back to the main question: why do you exceed the memory limit. Possible
option: the macro copies workbook entries, and you forget to clear these from
memory, or you have run your macro's several time in break mode without a
full memory clear.
Quick test: do you have this memory limit when you run the code after a PC
restart? If not, your code is the problem, not the memory....
 
What about something like this:

Sub Callermacro()
call Macro1
call Macro2
call Macro3
call Macro4
call Macro5
End Sub

Regards,
Stefi

„wamstrdad†ezt írta:
 
Sub RunAll()
Call Sub1
Call Sub2
Call Sub3
...
End Sub
Sub Sub1()
...
End sub
....
 
Back
Top