December 4, 2021
I have a functional code, however it closes the original workbook. I wish for the original and new workbook BOTH to remain open after The Save Macro is run. It works, but closes the original file, and I am left with the new workbook from the "SaveAs". Is there a way to alter this code so that BOTH original and new workbooks remain open?
Option Explicit
Sub SaveMeD2()
'Saves filename as value of A1 plus the current date
Dim newFile As String, fname As String
' Cell Range of file name
fname = Range("D2").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fname
' Change directory to suit your PC, including USER NAME
ChDir _
"C:\Users\barnes22\Projects\Manager Files"
ActiveWorkbook.SaveAs filename:=newFile
End Sub
1 Guest(s)