Running a list of Macros from a Macro

Tuckejam

Board Regular
Joined
Oct 15, 2013
Messages
81
I have a Macro that Pulls the 9 digit values from a worksheet and pastes it into a column on the same sheet.

I have a total of 38 sheets and a seperate macro for each. This works fine as sometimes i want to run only the macro for that sheet.

however sometmes I also want to run all of the macros for all of the sheets.

to do this I have just recorded a macro of me running each macro.

and i get this code

Code:
Sub Pull_All_Sheets()
'
' Pull_All_Sheets Macro
'
'
    Application.Run "'Store Name.xlsm'!Module2.Bamboo"
    Application.Run "'Store Name.xlsm'!Module2.Borders"
    Application.Run "'Store Name.xlsm'!Module2.Engineered"
    Application.Run "'Store Name.xlsm'!Module2.Laminate"
End Sub


the problem is that this contains the workbook name and i would like to be able to Copy this macro into other workbooks to do the same thing.

Any help is always apreciated
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You're thinking too hard.

Code:
Sub runTheMacro

    Call Module2.Bamboo
    Call Module2.Borders
    Call Module2.Engineered
    Call Module2.Laminate

End Sub


I don't even know if you need the "Module2" part.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,425
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top