R
Rick
I'm using late binding to avoid problems with different user versions of
Access 2003 and 2007. I'm automating Access from Excel, so my code is in
Excel. I removed my reference to Access in VBA Tools. My code works except
for the statement that calls the Access subroutine as below. I get a 7952
error, "Illegal function call." Help greatly appreciated.
Private Sub cmdPullData_Click()
Dim acApp As Object
Dim ws As Object
Dim dbs As Object
Dim myworkspace As String
'Access automation
Set acApp = GetObject(, "Access.Application")
Set ws = DAO.CreateWorkspace("myworkspace", "admin", "")
Set dbs = ws.OpenDatabase(strDB)
acApp.Run "DailyReport" << get 7952 error, "illegal function call"
....
End Sub
Access 2003 and 2007. I'm automating Access from Excel, so my code is in
Excel. I removed my reference to Access in VBA Tools. My code works except
for the statement that calls the Access subroutine as below. I get a 7952
error, "Illegal function call." Help greatly appreciated.
Private Sub cmdPullData_Click()
Dim acApp As Object
Dim ws As Object
Dim dbs As Object
Dim myworkspace As String
'Access automation
Set acApp = GetObject(, "Access.Application")
Set ws = DAO.CreateWorkspace("myworkspace", "admin", "")
Set dbs = ws.OpenDatabase(strDB)
acApp.Run "DailyReport" << get 7952 error, "illegal function call"
....
End Sub