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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
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
 

Forum statistics

Threads
1,181,170
Messages
5,928,513
Members
436,606
Latest member
ppainter1958

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
Top