ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Series of backed up files with time and date (https://www.excelbanter.com/excel-discussion-misc-queries/268780-series-backed-up-files-time-date.html)

genregist

Series of backed up files with time and date
 
Hello,

This is my first post. I'm quite a novice at this. I'd really appreciate it if someone could help me.

I want to create a macros code that will save the Excel spreadsheet in a folder and attach the time and date to the end of the file name before saving.

The macros in the spreadsheet in question would have to function on any Windows operating system. This is because it is to be distributed among about 40 of my colleagues, some of whom may be using XP, others of whom may be using Vista or Win7.

Ideally, the colleague would download the original spreadsheet, and then save it in any given directory on their computer. They would then open the file, and then the macros would save the file, attaching the time and date to the end of the file, in a folder called "backup", which the macros would create as a sub-directory in the directory where the currently opened spreadsheet is located.

I realize, however, that saving the renamed spreadsheet in the directory where the original spreadsheet was opened from when the location of said directory varies from user to user, may be difficult or impossible. Therefore, creating an directory and saving the file on the desktop of whatever user account the spreadsheet happens to be currently open on, would also be OK.

So, what I'm trying to make is a macros code that creates a directory and, inside that directory, saves a renamed version of the currently opened spreadsheet with the time and date behind it. This effectively creates a series of backups of that spreadsheet.

I should also mention that the reason I want to create this series of backups is because the spreadsheet in question has macros code in it that wipes out the undo stack. So I need to create backup files that my colleagues can refer to, because they will be unable to undo work they have done in the spreadsheet. What I would like to do is take the code that generates backups of the spreadsheet and insert it into these preexisting macros codes responsible for wiping out the undo stack. So, whenever these macroses are executed, a new backup file is created inside the sub-directory.

I've been trying for a day on my own figure this out. Unfortunately, I don't have the skills to get it done. So I'd really appreciate it if anyone could help me with this.


All times are GMT +1. The time now is 07:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com