Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AutoSave a WB copy everynight at midnight

Anyone have software suggestions

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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/


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
After midnight Steved Excel Worksheet Functions 3 December 12th 07 02:31 AM
mod formula used with midnight S in AZ Excel Worksheet Functions 1 September 6th 06 09:31 PM
Opened Autosave but when closing workbook Autosave closes itself Ken Excel Worksheet Functions 0 October 29th 05 05:11 PM
Removing AUTOSAVE.XLS(AUTOSAVE.XLA) from VBA editor??? belblanco[_13_] Excel Programming 5 July 17th 04 10:24 AM
Removing AUTOSAVE.XLS(AUTOSAVE.XLA) from VBA editor??? belblanco[_14_] Excel Programming 0 July 13th 04 07:23 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"