Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DP7 DP7 is offline
external usenet poster
 
Posts: 54
Default AUTOMATICALY SAVE

I think a macro is the best way to do this; if there is a way that is better
I am open to all suggestions. I am trying to create a backup copy of one of
my spreadsheets on a daily basis. I need this to be done every weekday night
@ around 11PM when I know all updates for that day should be done. I need the
file name to contain the date from that day. So far I have the macro below as
my starting point. I have tried doing different things to get what I want; I
have had varying degrees of success. If anyone has any ideas as to how I
should attack this I would be very grateful.
Thanks in advance.




Sub Saveas()
'
' Saveas Macro
' Macro recorded 10/11/2007 by
'

'
ChDir _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies"
ActiveWorkbook.Saveas Filename:= _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies\Book1.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default AUTOMATICALY SAVE

Do you have the file open all the time? You would have to have the file open
and set up a timer event to fire off the macro to save the file.

If the file is not kept open, I would use a short VBS script and schedule it
to run using schedule tasks from the control panel (assuming you are running
windows NT or later)

The script would look something like:
---------------
dim filesys
dim today


today = datepart("YYYY",date)*10000+datepart("M",date)*100 +datepart("D",date)
set filesys=createobject("Scripting.FileSystemObject")

filesys.CopyFile "R:\Production Reports\Production Summary Report\Daily
Production Summary Copies\book1."+cstr(today)+".xls", "{pathToFile}\book1.xls"

-------------
Peter Richardson

"DP7" wrote:

I think a macro is the best way to do this; if there is a way that is better
I am open to all suggestions. I am trying to create a backup copy of one of
my spreadsheets on a daily basis. I need this to be done every weekday night
@ around 11PM when I know all updates for that day should be done. I need the
file name to contain the date from that day. So far I have the macro below as
my starting point. I have tried doing different things to get what I want; I
have had varying degrees of success. If anyone has any ideas as to how I
should attack this I would be very grateful.
Thanks in advance.




Sub Saveas()
'
' Saveas Macro
' Macro recorded 10/11/2007 by
'

'
ChDir _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies"
ActiveWorkbook.Saveas Filename:= _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies\Book1.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default AUTOMATICALY SAVE

Do you have the file open all the time? You would have to have the file open
and set up a timer event to fire off the macro to save the file.

If the file is not kept open, I would use a short VBS script and schedule it
to run using schedule tasks from the control panel (assuming you are running
windows NT or later)

The script would look something like:
---------------
dim filesys
dim today


today = datepart("YYYY",date)*10000+datepart("M",date)*100 +datepart("D",date)
set filesys=createobject("Scripting.FileSystemObject")

filesys.CopyFile "R:\Production Reports\Production Summary Report\Daily
Production Summary Copies\book1."+cstr(today)+".xls", "{pathToFile}\book1.xls"

-------------
Peter Richardson

"DP7" wrote:

I think a macro is the best way to do this; if there is a way that is better
I am open to all suggestions. I am trying to create a backup copy of one of
my spreadsheets on a daily basis. I need this to be done every weekday night
@ around 11PM when I know all updates for that day should be done. I need the
file name to contain the date from that day. So far I have the macro below as
my starting point. I have tried doing different things to get what I want; I
have had varying degrees of success. If anyone has any ideas as to how I
should attack this I would be very grateful.
Thanks in advance.




Sub Saveas()
'
' Saveas Macro
' Macro recorded 10/11/2007 by
'

'
ChDir _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies"
ActiveWorkbook.Saveas Filename:= _
"R:\Production Reports\Production Summary Report\Daily Production
Summary Copies\Book1.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

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
Can you make excell automaticaly save to the current date & time? Jim Excel Discussion (Misc queries) 3 May 17th 07 04:49 PM
Can you automaticaly save a shared file every few mintues? Ben Excel Discussion (Misc queries) 0 February 7th 07 03:23 PM
macro to save file automaticaly? david Excel Discussion (Misc queries) 1 May 6th 05 05:21 PM
Macro to automaticaly save a book under an specific name Marissa[_2_] Excel Programming 1 August 5th 04 02:08 AM
refresh a cell automaticaly each second ? LoloSoft Excel Programming 1 January 20th 04 03:27 PM


All times are GMT +1. The time now is 08:02 PM.

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"