Copy Macro to new File

AntMac

Board Regular
Joined
Dec 1, 2009
Messages
146
I have most of what I want done thanks to the people here for now. Of course that will change once my mind expands on other touchups lol. But I have one last thing that I don't know if it can be done, but I would like to. I have a macro that takes a simple list of information, creates a new file with this information on 12 duplicate sheets, i.e. for every month of the year. My question is I want to put a macro in that file, so if that original information changes in the middle of the year, it's an easy method to update the remaining months in the year. So, long story short, is it possible in a macro to copy another macro in one file, to a second new file? And if so, what's the code.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I had a couple of hurdles to overcome in order to get it to work, but it DID. Thanks a bunch!!!!!! Just in case someone else uses later, the thing I had trouble with was defining the projects. Apparrantly this is one case where you must use set in front of the definition. So either,

Set FromVBProject = ActiveWorkbook.VBProject
or
Set ToVBProject = Workbooks("Book1").VBProject

as examples will work. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,986
Members
448,538
Latest member
alex78

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