Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi all,
I have a code that allows me to create a new excel document from an existing one, where it closes the existing document and opens up the new created document.
Here it is and works wonderful in this way:
My question is how do I modify this code to create an existing document, which does not close the existing document but rather creates a new document unopened?
I'm not sure how to modify this code.
Please let me know if you know how to do this.
Thank you,
pinaceous
I have a code that allows me to create a new excel document from an existing one, where it closes the existing document and opens up the new created document.
Here it is and works wonderful in this way:
VBA Code:
Dim strName As String
strName = ThisWorkbook.Path & "\" & Format(Date, "DDMMMYYYY ") & Sheet1.Name & " " & ".xlsm"
ActiveSheet.Copy
ThisWorkbook.SaveAs FileName:=strName, FileFormat:=xlOpenXMLWorkbookMacroEnabled
ActiveWorkbook.Close savechanges:=False
My question is how do I modify this code to create an existing document, which does not close the existing document but rather creates a new document unopened?
I'm not sure how to modify this code.
Please let me know if you know how to do this.
Thank you,
pinaceous