PDA

View Full Version : Solved: help with saving a program



jarodz22
04-01-2008, 12:54 PM
I need help, my problem is, I need to save a excel wordbook file every Monday morning around 10:00 am and save this file with the day added to his is to the name or change the file name for the date, this is to keep a weekly record

mdmackillop
04-01-2008, 01:29 PM
Are you looking to save the active file or some other one. Might it be open by anyone else? To what extent do you wish to auitomate this?

jarodz22
04-01-2008, 06:52 PM
the active one, I need a Macro to do this action

mdmackillop
04-02-2008, 12:38 AM
Try

Sub Copies()
If Weekday(Date) = 2 Then
Application.OnTime TimeValue("10:00:00"), "MakeCopy", TimeValue("11:00:00")
End If
End Sub
Sub MakeCopy()
ActiveWorkbook.SaveCopyAs ActiveWorkbook.Path & "\" & _
Split(ActiveWorkbook.Name, ".")(0) & Format(Date, "-yymmdd") & ".xls"
End Sub