P
phil
Hi,
I have a piece of code that was working before, but now
produces a runtime error 70, permission denied. Here's
the code, where beString is the linked database (such
as "C:\database.mdb") and versionLoc is the name of the
folder it will be copied to (such as "tempfolder")
Public Function CopyBackend(beString As String, versionLoc
As String)
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
'Copy the backed database to C:\ drive
If fs.FolderExists(versionLoc) = True Then
fs.DeleteFolder versionLoc, True
End If
fs.CreateFolder versionLoc
fs.CopyFile beString, versionLoc
Set fs = Nothing
End Function
Does anyone have any insight into why this error is
occuring?
Thanks,
Phil
I have a piece of code that was working before, but now
produces a runtime error 70, permission denied. Here's
the code, where beString is the linked database (such
as "C:\database.mdb") and versionLoc is the name of the
folder it will be copied to (such as "tempfolder")
Public Function CopyBackend(beString As String, versionLoc
As String)
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
'Copy the backed database to C:\ drive
If fs.FolderExists(versionLoc) = True Then
fs.DeleteFolder versionLoc, True
End If
fs.CreateFolder versionLoc
fs.CopyFile beString, versionLoc
Set fs = Nothing
End Function
Does anyone have any insight into why this error is
occuring?
Thanks,
Phil