Thread: Autoback up
View Single Post
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

It sounds as if you're saying that the problem would go away of you opened
Personal.xls read-only. I always open my Personal RO because I do not like
to get the RO message from Excel when I open a second Excel instance.

So in my Personal.xls. from Sub Auto_Open, I call this sub:

Sub SetRO()
On Error Resume Next
ThisWorkbook.Saved = True
ThisWorkbook.ChangeFileAccess Mode:=xlReadOnly
End Sub


--
Jim Rech
Excel MVP
"Greg B" wrote in message
...
|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
|
|