PDA

View Full Version : [SOLVED] OLE action warning message



Molby
10-07-2004, 01:54 AM
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.

Daniel Klann
10-07-2004, 05:58 AM
Hi,

The reply from Rob Bovey in this newsgroup thread: http://groups.google.com.au/groups?hl=en&lr=&threadm=20020521220519.17097.00000435%40mb-ce.aol.com&rnum=1&prev=/groups%3Fq%3DMicrosoft%2BExcel%2Bis%2Bwaiting%2Bfor%2Banother%2Bapplication %2Bto%2Bcomplete%2Ban%2BOLE%2Baction%26hl%3Den should help answer your question.


Regards,
Daniel

Molby
10-07-2004, 06:25 AM
Thanks Daniel, I can't access the site at work, but I'll try at home tonight and let you know how I get on.

Molby
10-08-2004, 03:31 AM
Daniel,

You are a complete star, you don't know the relief that has brought me, thank you so much.