rhombus4
Well-known Member
- Joined
- May 26, 2010
- Messages
- 586
- Office Version
- 365
- 2016
- Platform
- Windows
I know I can save an open/active workbook using code below.
What I want to do is Copy a closed workbook and Save a Copy into a New Location adding the Date
i.e If Closed workbook is Called MainDoc.xls and is located in C:\MainDoc.xls
I want it copied to my documents and add today's date and full time in case it is copied at same time e.g. C:\MyDocs\Maindoc 25-06-20 14:06:22.xls
What I want to do is Copy a closed workbook and Save a Copy into a New Location adding the Date
i.e If Closed workbook is Called MainDoc.xls and is located in C:\MainDoc.xls
I want it copied to my documents and add today's date and full time in case it is copied at same time e.g. C:\MyDocs\Maindoc 25-06-20 14:06:22.xls
VBA Code:
Dim wbookstring As String
wbookstring = "C:\Copy.xlsx"
ActiveWorkbook.SaveAs filename:=wbookstring