View Single Post
 
Old 08-11-2019, 08:35 PM
Khwaja Khwaja is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2018
Posts: 12
Khwaja is on a distinguished road
Default Closing & Opening Files

I am using the following code to create a duplicate of an active file and then close the active file. But I am struggling to open the file I just created. Will appreciate some hand holding.



Code:
Sub Copy()
Dim strFilename As String
strFilename = ActiveWorkbook.Path & "" & "GJCT Roster Week " & Range("sWeekNo") + 1 & " WS " & Range("sWeekStart") + 7 & ".xlsm"
ActiveWorkbook.SaveAs Filename:=strFilename, FileFormat:=52
ActiveWorkbook.Close
End Sub

Last edited by Pecoflyer; 08-11-2019 at 11:57 PM. Reason: Replaced quote tags with code tags
Reply With Quote