DonAndress
Active Member
- Joined
- Sep 25, 2011
- Messages
- 365
- Office Version
- 365
- 2021
- Platform
- Windows
Hello.
I have a macro that contains multiple modules and lots of code lines and also many worksheets. Using VBA I'd like to create a copy of this file but I'd like to strip it completely off the code (modules) and also I'd like to save only 3 specific sheets out of all existing. This is to save drive space as this kind of archiving will be performed on a daily basis.
Right now I have:
ActiveWorkbook.SaveCopyAs Filename:=Path & FileName & ".xlsm"
but of course it saves an exact copy of the original file.
How can achieve all above?
Simple ".xls" at the end gives a corrupt file as an output.
I have a macro that contains multiple modules and lots of code lines and also many worksheets. Using VBA I'd like to create a copy of this file but I'd like to strip it completely off the code (modules) and also I'd like to save only 3 specific sheets out of all existing. This is to save drive space as this kind of archiving will be performed on a daily basis.
Right now I have:
ActiveWorkbook.SaveCopyAs Filename:=Path & FileName & ".xlsm"
but of course it saves an exact copy of the original file.
How can achieve all above?
Simple ".xls" at the end gives a corrupt file as an output.