Please help rectify my code - looking to run a code to split my files into multiple different copies, managed to save the file but can't open the original file.
Dim strName As String
Dim FileName As String
Const Path As String = "C:\Users\PathName\"
strName = ActiveWorkbook.FullName
Application.DisplayAlerts = False
FileName = Path & "as of " & Format(Now() - 1, "dd mmmm yyyy") & " - A" & ".xlsx"
ActiveWorkbook.SaveAs FileName, xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
Workbooks.Open("C:\Users\PathName\Spare.xlsm")
Dim strName As String
Dim FileName As String
Const Path As String = "C:\Users\PathName\"
strName = ActiveWorkbook.FullName
Application.DisplayAlerts = False
FileName = Path & "as of " & Format(Now() - 1, "dd mmmm yyyy") & " - A" & ".xlsx"
ActiveWorkbook.SaveAs FileName, xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
Workbooks.Open("C:\Users\PathName\Spare.xlsm")