macro to run macros

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.
 
R

rdwj

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....
 
S

Stefi

What about something like this:

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

Regards,
Stefi

„wamstrdad†ezt írta:
 
D

Dave Peterson

Sub RunAll()
Call Sub1
Call Sub2
Call Sub3
...
End Sub
Sub Sub1()
...
End sub
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Run multiple macros 4
Running 4 macros at once 2
Macro Help 1
problem with macro setting 1
Disable Macro Alert 2
Excel Macro Warning problems 1
macro help 2
Macros don't work when file name changes 2

Top