M
Mary S.
I am trying to open an Access database from within Excel using VBA. Here is
my code:
Dim MyAccess As Access.Application
Set MyAccess = CreateObject("Access.Application")
MyAccess.Visible = True
MyAccess.OpenCurrentDatabase ("\\server\folder\xyz.mdb")
The last line of code triggers the following error message:
Run-time error '7866'
Microsoft Office Access can't open the database because it is missing, or
opened exclusively by another user.
The database is not, in fact, opened exclusively by another user. The error
message appears when the Access macro security level is set to medium. The
error message does not appear when the Access macro security level is set to
low. Is there any way to avoid this error, or bypass the error and still
open the database, without changing the Access macro security level to low?
Thanks,
my code:
Dim MyAccess As Access.Application
Set MyAccess = CreateObject("Access.Application")
MyAccess.Visible = True
MyAccess.OpenCurrentDatabase ("\\server\folder\xyz.mdb")
The last line of code triggers the following error message:
Run-time error '7866'
Microsoft Office Access can't open the database because it is missing, or
opened exclusively by another user.
The database is not, in fact, opened exclusively by another user. The error
message appears when the Access macro security level is set to medium. The
error message does not appear when the Access macro security level is set to
low. Is there any way to avoid this error, or bypass the error and still
open the database, without changing the Access macro security level to low?
Thanks,