How to create a workbook with presaved macros

masterxl

New Member
Joined
Jul 28, 2011
Messages
3
Hi All,

I am creating a VBA application, I'm faced with a problem that is-- When a ever i create a new workbook, i am unable to get macros with which it has been created..

Plz provide me the solution...

Thanks In Advance :)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I'm afraid your question makes no sense at all to me. Can you please clarify what it is you want?
 
Upvote 0
I'm afraid your question makes no sense at all to me. Can you please clarify what it is you want?


Sorry For Inconvenience,:(

let us assume I have macro 'A', After Running 'A', it will create workbook 'B'.

What all i need is---- The Workbook 'B' should have macro 'A'.
 
Upvote 0
The easiest way is to create a template that contains the macro(s) you want and then use that when you create the new workbook. Or simply save the original workbook under a new name - it will contain all the same code.
 
Upvote 0
I agree with Rory - that seems like the easiest and neatest solution.

However if you actually want to copy a module out of your workbook into another workbook, check this link.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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