Copy VBA Module to new workbook

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a script that I run the formats a bunch of data and copies 5 sheets
and puts them in a new work book. I want to add an autorun module to this
new book. I'm not sure if it is easier to add the module from scratch or
copy it, but I want the module to be there when the other code I have saves
the new work book.

Can anyone offer any suggestions?

thanks!
Mark
 
Create a template file with the code, layouts etc already in-situ. Then
when creating a new workbook use the template.
 
Mark said:
I have a script that I run the formats a bunch of data and copies 5 sheets
and puts them in a new work book. I want to add an autorun module to this
new book. I'm not sure if it is easier to add the module from scratch or
copy it, but I want the module to be there when the other code I have saves
the new work book.

Can anyone offer any suggestions?

thanks!
Mark

Make an excel addin that contains your module. That way the module is
available to all workbooks as long as the addin is selected in excel.

P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top