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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

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,147,846
Messages
5,743,520
Members
423,801
Latest member
paulj4177

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