Waiting for an OLE Action
There is nothing wrong with your code. The reason you saw that annoying
message box is because excel is running out its ole waiting time.
The simplest way to give a remedy is by adding the following code at the
beginning of your VBA or any type of interoperability code.
' app_excel is a excel application object
app_excel.DisplayAlerts = False
and don't foreget to restore it back at the bottom line of your code
' app_excel is a excel application object
app_excel.DisplayAlerts = true
--
John 3:16
"Candyman" wrote:
I have a program that automatically create reports through SQL and Excel. It
opens report templates, runs the associated SQL, creates and exports the
reports to defined directories. I need to run an Access application to
generate one particular set of reports. It works, but after so many minutes I
get this "Microsoft Office Excel is waiting for another application to
complete an OLE action."
I don't mind the message as Access will complete its tasks and come back to
the scheduler. However, the message box is still up there and I have to click
it to go to the next report. Is there a way I can program around or through
the message box?
Candyman
|