macro new work book

Rich

Active Member
Joined
Feb 19, 2003
Messages
283
How can I move a macro from one work to use in another? Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
If you're just doing this as a one time shot, (You don't mean doing it programatically do you?), you can simply copy from the module in Book1 & paste it in the module of Book2. (ie.)

Open both workbooks.
Open the VB editor and locate both workbooks in the project explorer.
Locate the module the code is in, in Book1
Create a module if necessary in Book2.
Go into the module in book1, highlight & copy the entire routine, select the (new?) module in book2 and paste the code in there.
Save Book2.

Should be all you need to do.

Is that what you were asking?
Dan
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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