jacob spitzer
jacob spitzer

Reputation: 111

How to fix: Permission Denied, runtime error 70, FSO filescripting, Computer Issue

I have a code using to backup the current active Access Database using VBA. but it works only on my laptop, not on my computer at work. both of them is Win 10, Same office version, Security Permission is also the same settings, what can be the problem? the difference?

Please see the provided code here:

Sub backup()

Dim FSO As Object

Set FSO = CreateObject("scripting.filesystemobject")

FSO.CopyFile Application.CurrentProject.FullName, _
Left(Application.CurrentProject.FullName, _
Len(Application.CurrentProject.FullName) - 6) & "_Backup.accdb"

End Sub

Upvotes: 1

Views: 2978

Answers (1)

jacob spitzer
jacob spitzer

Reputation: 111

I found the solution after a lot of testing and troublesooting The solution is the setting of "Deafult open mode" in access. i changed from "Exclusive" to "Shared" and it works.

Upvotes: 2

Related Questions