Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy excel workbook without the macro's 2

Status
Not open for further replies.

bigalmcintyre

Technical User
Feb 7, 2005
3
GB
Can anyone suggest a routine that makes a copy of an entire workbook (differing numbers of sheets open) without copying the macro's or VBA to the new workbook. My application is a fairly basic routine that sorts and reconciles data and the macro's are currently public (saved within the main sheet).

Cheers
Alan
 
not easily - when I want to do this I normally just copy the data to a new workbook and save that instead. There are ways of doing it but can be quite long and complex...

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Thanks for the advice. Am I going about this the wrong way? Would it be easier to save the open workbook under a different filename but without the macro's being saved on the newly saved version?

Does anyone have any code suggestions for this?
 
You could do it the way xlbo has suggested or you could save the workbook under a different name then go into the VBE and remove the module(s) etc. Only prob with this is that there may be code in the worksheet or workbook modules so you will have to check each one individually.

Either way you would have it done before I could write the code for you!!

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top