17. VBA Tips - Save A Copy Of A File Daily
Often during your working environment, you will need to track the history of a spreadsheet.
- This tip will teach you how to seemlessly create a daily backup of your file
- The file will be date stamped so that you can sort by date and easily find a file you're looking for when you need
Here's a screen shot of our VBA code:
Explanation
- Assign a button to the SaveMeDaily sub routine
- myDateStamp is then set equal to the date in "yyyymmdd" format
- So for today, that would be: 20090512
- The advantage of this is that you can sort by name in a browser
- FilePath is then constructed as thisworkbook's path + the date stamp
- We then use SaveCopyAs to save a copy as 20090512.xls
Download sheet to practise how to Save A Copy Of A File Daily in Excel
Training Video on how to Save A Copy Of A File Daily in Excel:
Attachment | Size |
---|---|
save-a-copy-of-a-file-daily.xls | 35.5 KB |
»
- Nick's blog
- Login or register to post comments
- 25318 reads
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago