Hi! Here is a macro I am using to save a workbook using 'Save As' (I can't take credit for the full macro. A forum member was kind enough to help me with it. The only part I added was the 'Open' portion.)
I have it open a template workbook we use, and then perform a save as, pathed to a specific folder on the desktop. We do this every night just before midnight.
What I haven't been able to figure out is how to have it save to the next month folder (The folders with the name of all the months are already created) on the last day of each current month.
For example. In my code, the final folder in the path is the current month July. On July 31 when I run the macro, I would like it to save it in the folder called August.
Is there a way to code this so it will recognize what the current month is and then at the end of each current month save it in the next month?
Here is my code.
Thank you in advance.
Sub OpenSaveAs()
' Open
'
'
Workbooks.Open Filename:= _
"C:\Users\Chris\Desktop\Work excel\Original Log..xlsm", UpdateLinks:=0
Application.DisplayAlerts = 0
ActiveWorkbook.SaveAs Filename:="C:\Users\Chris\Desktop\Daily Logs DO NOT DELETE\2014\July\ " & Format(Now() + 1, "mmmm-dd-yyyy") & ".xlsx", FileFormat:=51, CreateBackup:=False
Application.DisplayAlerts = 1
End Sub
Bookmarks