Prev Previous Post   Next Post Next
  #1   Report Post  
Greg B
 
Posts: n/a
Default Autoback up

I have excel back up my file throught the code which I got from this forum.
Just one problem with it is I have it run every couple of hours so I dont
lose the work I have completed and it work perfectly except it wont open
because I have personal.xls already open. It continues fine once I click
the read-only tab. I am using the task manager to fire up the workbook at
certain times so it loads another version of excel.

Can i get this macro to run at a certain time if I put it in the
personal.xls

here is the code

Dim oFSO As Object
Dim sFolder As String
Application.DisplayAlerts = False

Set oFSO = CreateObject("Scripting.FileSystemObject")
sFolder = "I:\"
If Not oFSO.FolderExists(sFolder) Then
MkDir sFolder
End If
If Not oFSO.FolderExists(sFolder & Format(Date, "yyyy-mm-dd")) Then
MkDir sFolder & Format(Date, "yyyy-mm-dd")
End If
oFSO.CopyFolder "C:\IDSC", sFolder & Format(Date, "yyyy-mm-dd")
Set oFSO = Nothing
Application.DisplayAlerts = True
ActiveWorkbook.Close

Any help would be great

Thanks again

Greg


 
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



All times are GMT +1. The time now is 12:34 AM.

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

About Us

"It's about Microsoft Excel"