Macro to copy a macro?

IAmLemondrop

New Member
Joined
Feb 19, 2013
Messages
13
Is it possible to create a macro that copies a different macro to an existing worksheet?</SPAN>

I’ve created a macro for another person to format their reports. I’ve given instructions to open the worksheet I’ve created, then open their file with the data and run one of 10 macros to format their report. The problem is that after the formatting is done and before the report is sent out it needs to contain a macro so the final end user can run a page break macro if they need to.</SPAN>

I can't put everything in one file because I don’t want the end user to see my formatting macros (it serves no purpose for them at that point anyway). I could create a new workbook with the page break macro already in it, however I’m trying to avoid having the other person copy/paste from one worksheet to another for 10 different reports.</SPAN>

Any ideas?</SPAN>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If in MS Excel 2010 then save it as not macro enabled file. Macro drops off automatically.

Alternative macros you don't want user to see type word "Private" in from macro . For instance, Private Sub Test(). Word Private hides macro when you press ALT+F8
 
Last edited:
Upvote 0
Sorry, I guess I didn't state that clearly. I want to add a macro to the final product. I already have the user opening 1 file that has all the macros and then opening their files (10) with the data. I can create templates with the page break macro already included, but I wanted to avoid having the user opening 10 different templates.
 
Upvote 0

Forum statistics

Threads
1,215,370
Messages
6,124,526
Members
449,169
Latest member
mm424

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