Move All Macros To New Workbook

Nanogirl21

Active Member
Joined
Nov 19, 2013
Messages
331
Office Version
  1. 365
Platform
  1. Windows
Is there an (easy) way to move ALL macros to a new workbook? I need to move around 100 macro's. The only way I know how to do this is to:

(1) Copy and paste everything into new modules.
(2) Export each modules 1 by 1 and then import into new workbook 1 by 1.
(3) Drag and drop each macro into the new workbook 1 by 1.

Is there any add-in that allows movement of multiple modules at once? Maybe even an export all modules and import all modules option?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
You could first copy them all into a single module, then you've only got to export that 1 and import it.
 
Upvote 0
Are all macros in one workbook? And you want to move all of them to a new workbook? You mean a blank workbook? Why not just save the workbook to a new name and delete all the data?
 
Upvote 0
Are all macros in one workbook? And you want to move all of them to a new workbook? You mean a blank workbook? Why not just save the workbook to a new name and delete all the data?

No, they are not all in 1 workbook. There are 7 workbooks and I need to combine all macros that are in those 7 into one "master" workbook.
 
Upvote 0
You could first copy them all into a single module, then you've only got to export that 1 and import it.

How would this work? I've never used multiple macros with only 1 single module. Wouldn't the codes all mesh together and become 1 massive blob? I will still need to run the macros individually.
 
Upvote 0
The quickest way I now off, is to drag & drop the modules in the VBA project window.
 
Upvote 0
How would this work? I've never used multiple macros with only 1 single module. Wouldn't the codes all mesh together and become 1 massive blob? I will still need to run the macros individually.

Providing each macro has a unique name, you can have as many different macros in 1 workbook/module as you like. So you can open each workbook and copy all their macros into your master workbook module.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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