M
March
I don't know how to solve this problem. I've found run-time error 429. My
code is below:
Dim db As Database
Dim rst As Recordset
Dim wb As Object
Set wb = Sheets("Sheet1")
xPathAndName = Trim(xPath) + Trim("MainDBProject.mdb")
'this line is cuase of error
Set db = Workspaces(0).OpenDatabase(xPathAndName, ReadOnly:=True)
Set rst = db.OpenRecordset("InputTB")
I have main interface in ms Access. Once run the application in ms access,
it will open excel workbook. The code above is in Excel. So I'm not sure that
the error occur because of "MainDBProject.mdb" is already opened.
Please give me suggestion.
Thanks,
March
code is below:
Dim db As Database
Dim rst As Recordset
Dim wb As Object
Set wb = Sheets("Sheet1")
xPathAndName = Trim(xPath) + Trim("MainDBProject.mdb")
'this line is cuase of error
Set db = Workspaces(0).OpenDatabase(xPathAndName, ReadOnly:=True)
Set rst = db.OpenRecordset("InputTB")
I have main interface in ms Access. Once run the application in ms access,
it will open excel workbook. The code above is in Excel. So I'm not sure that
the error occur because of "MainDBProject.mdb" is already opened.
Please give me suggestion.
Thanks,
March