Macro to copy worksheet to new workbook including macros

depcdivr

Active Member
Joined
Jan 21, 2008
Messages
349
Office Version
  1. 365
Platform
  1. Windows
I know how to copy a worksheet from an open workbook to a new one. However, I also have several Macro's that are attached to the worksheet. I need to copy these macro's(or entire module) into the new workbook. Is this possible?

I need to do it with a macro because the original spreadsheet will be used by many people who will not know how to import a module.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What I am doing is actually creating a new workbook from my original macro. But I want that workbook to have macro's in it that I can access from the newly created workbook. Therefore I want to copy a module with macros in it over from the old workbook to the new workbook.

I can not use the save as because I need the original macro to generate responses and keep a log of information that should not go with the newly created workbook.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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