merging all macros into one

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 6 macros in 8 worksheets (in one Excel File). They have to be executed
respectively, meaning one after one with orders.

How can i generate a new Macro to combine those 6 individual macros ?

other words: other user just click one button and all 6 macro functions are
executed respectively ?
 
Hi Ali,

Create one more macro that is called when the button is clicked. In this
macro put code like this:-

Call Macro1
Call Macro2
Call Macro3

and each macro will run.

Usually when I do this, I set up any Dim statements at the top of the macro
before the first sub and then they apply to all of the subroutines.

Regards,

OssieMac
 
if the code is in worksheet modules instead of standard modules, you can do
something like this:

Sub run_all()
Run "sheet1.macro1"
Run "Sheet2.macro2"
Run "Sheet3.macro3"
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

Back
Top