Hi All,

I regularly run a routine from Excel 2002 to Access 2000 to run a macro (I know I should use VBA but I don't have the time code all of the 37 macros that we have) that runs some queries and reports and outputs the data into an Excel file, code below.

Sub GetData()
DatabaseName$ = "C:\Credit Database.mdb"
Set acApp = CreateObject("Access.Application")
acApp.Visible = True
acApp.OpenCurrentDatabase (DatabaseName$)
acApp.DoCmd.RunMacro "Mac-MyMacroName"
End Sub
The problem I have is that sometimes the process can take quite a long time to finish. After about a minute in Excel, I get the following message.
"Microsoft Excel is waiting for another application to complete an OLE action."
And I continue to get the message then every 10 seconds or so.

I've tried using

Application.ODBCTimeout = 0
But I still get the error message. I also know that in Access, under Options, on the Advanced tab there is an option for OLE/DDE timeout, but I can't find an equivalent in Excel.

Can anyone help?

Many thanks in advance.