ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoSave a WB copy everynight at midnight (https://www.excelbanter.com/excel-programming/305216-autosave-wb-copy-everynight-midnight.html)

sp00nix[_7_]

AutoSave a WB copy everynight at midnight
 
We have a file that is updated constantly and would like to star
tracking the changes. I could make a macro that would easily save
copy everytime the file is edited by a user, but that would create
lot of files! Is there any way i could have the workbook saved to
particular location every day at midnight?

It would be saved as "myWB" & Date & ".xls" to keep the files uniquel
named

--
Message posted from http://www.ExcelForum.com


Frank Kabel

AutoSave a WB copy everynight at midnight
 
Hi
I would not use Excel/VBA for this as this would require a running
Excel application. Try searching for a scheduling program on operating
system level (there're a lot of shareware schedulers available)

--
Regards
Frank Kabel
Frankfurt, Germany


We have a file that is updated constantly and would like to start
tracking the changes. I could make a macro that would easily save a
copy everytime the file is edited by a user, but that would create a
lot of files! Is there any way i could have the workbook saved to a
particular location every day at midnight?

It would be saved as "myWB" & Date & ".xls" to keep the files

uniquely
named.


---
Message posted from http://www.ExcelForum.com/



sp00nix[_10_]

AutoSave a WB copy everynight at midnight
 
Anyone have software suggestions

--
Message posted from http://www.ExcelForum.com


Gord Dibben

AutoSave a WB copy everynight at midnight
 
Windows Task Scheduler??

Build a *.bat or *.vbs file to save the workbook. Task Scheduler would run
that file at midnight.

Gord Dibben Excel MVP

On Tue, 27 Jul 2004 15:58:54 -0500, sp00nix
wrote:

Anyone have software suggestions?


---
Message posted from http://www.ExcelForum.com/



sp00nix[_11_]

AutoSave a WB copy everynight at midnight
 
And that's exactly what I did.. Here's the code for anyone who woul
like to reference this thread in the futu


Code
-------------------

Dim fso
Dim myDate
if len(month(date())) = 2 then
myDate = Replace(FormatDateTime(Date(),2),"/","-")
else
myDate = "0" & Replace(FormatDateTime(Date(),2),"/","-") & " "
end if
set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "myFile.xls", _
"c:\backup\myFile" _
& myDate _
& Replace(FormatDateTime(Time(),4),":",".") & ".xls"
set fso = nothing
'msgbox "Done!"

-------------------


This will save a copy similar to "myFile 07-28-2004 23.55.xls" in you
back up directory. In this case, i scheduled it daily, at 11:55 PM

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:58 PM.

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