H
Hydra
It gets worse.
I took code right out of the help file and pasted it in the visual basic
editor under Excel on my home PC----And got the same error message: can't
find the file or it is opened exclusively by another user.
Here is the code:
Sub DisplayTable()
Dim strDB As String
Dim appAccess As Access.Application
Const strPath = "C:\Pct\"
strDB = strPath & "MSPData2"
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
appAccess.OpenCurrentDatabase strDB
appAccess.DoCmd.OpenTable "MSPData"
End Sub
Access window opens but the Opencurrentdatabase command fails.
Is there some other way to open a database and access the tables?
I took code right out of the help file and pasted it in the visual basic
editor under Excel on my home PC----And got the same error message: can't
find the file or it is opened exclusively by another user.
Here is the code:
Sub DisplayTable()
Dim strDB As String
Dim appAccess As Access.Application
Const strPath = "C:\Pct\"
strDB = strPath & "MSPData2"
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
appAccess.OpenCurrentDatabase strDB
appAccess.DoCmd.OpenTable "MSPData"
End Sub
Access window opens but the Opencurrentdatabase command fails.
Is there some other way to open a database and access the tables?