Sub save()
Dim syear As String
Dim smonth As String
Dim sbasepath As String
sbasepath = "C:\Completed Scorecards\" 'set your basepath if you want to use this
syear = Year(Now) 'Set this year
If Len(Month(Now)) = 1 Then
smonth = "0" & Month(Now) 'Add leading zero
Else
smonth = Month(Now)
End If
spath = sbasepath & MonthName(Month(Now)) & "\" 'set the base level + month name + year c:\users\test\May
'sPath = sbasepath & MonthName(Month(Now)) & " " & syear & "\" 'set the base level + month name + year - c:\users\test\may 2016
'lets check if the directory exists, if not then lets create it
If Dir(spath, vbDirectory) = "" Then
MkDir spath 'Create directory if it does not exist
End If
'/////////// DELETE THIS SECTION IF YOU DONT WANT ANOTHER SUB FOLDER CREATED WITH TODAYS DATE 21 JUNE 2018 /////////////////
'Lets create a day folder in the month folder with todays date, if it does not already exist
spath = spath & Format(Now, "DD") & " " & MonthName(Month(Now)) & " " & syear & "\" 'Set path incl. month
If Dir(spath, vbDirectory) = "" Then
MkDir spath 'Create directory if it does not exist
End If
'/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
If Len(Dir(spath & sFilename)) = 0 Then
'below I have changed this section to just display the path,
'ActiveWorkbook.SaveCopyAs Filename:=sPath & sFilename
MsgBox spath & sFilename
End If
End Sub