Ok guys, After poking around on a couple of solutions here is what I have to save my "Master File" as a date stamped copy.xlsx. But then I would like the Sub or Private sub to clear the contents of ranges of cells on the master file and NOT affect the datestamped version.
To give you a better idea perhaps, the masterfile is hung in sharepoint where everyone has access to put in their daily locations. Once all have reported, I save that as today's report (date stamp), then clear the contents and reset the date for the next business day. I'd be saving quite the few clicks to be able to write this in. I also then take one sheet of the master file and copy its over into a separate file which goes up to the director's office every day. So in essence, I'm working with two Master files. Our Division's version where everyone goes into mark locations on one sheet, the director's version sheet which is a lot of "countif(s)" generating numbers onto the Director's version sheet. Then I have a Director's version WB with just the one sheet, where I copy over the sheet out of the Division WB.
Learning all this VBA stuff would help eliminate all the copy/paste/clear/save as clicking through each day, and also simplify things for anyone having to do this in my absence.
Anywho, here's the code I have that you all helped with yesterday. Now to start piecing together the clearing contents, then copy over one sheet to the other WB, etc.
Sub SaveToday()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.Path & "\" & "Learning-" & Format(Now, "yyyymmdd"), 51
Application.DisplayAlerts = True
End Sub
To give you a better idea perhaps, the masterfile is hung in sharepoint where everyone has access to put in their daily locations. Once all have reported, I save that as today's report (date stamp), then clear the contents and reset the date for the next business day. I'd be saving quite the few clicks to be able to write this in. I also then take one sheet of the master file and copy its over into a separate file which goes up to the director's office every day. So in essence, I'm working with two Master files. Our Division's version where everyone goes into mark locations on one sheet, the director's version sheet which is a lot of "countif(s)" generating numbers onto the Director's version sheet. Then I have a Director's version WB with just the one sheet, where I copy over the sheet out of the Division WB.
Learning all this VBA stuff would help eliminate all the copy/paste/clear/save as clicking through each day, and also simplify things for anyone having to do this in my absence.
Anywho, here's the code I have that you all helped with yesterday. Now to start piecing together the clearing contents, then copy over one sheet to the other WB, etc.
Sub SaveToday()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.Path & "\" & "Learning-" & Format(Now, "yyyymmdd"), 51
Application.DisplayAlerts = True
End Sub