Waiting for OLE Action to complete

stepone

Registered User.
Local time
Today, 13:20
Joined
Mar 2, 2004
Messages
97
Hi,

I have some VBA code sitting in Excel, which opens an Access application, and calls a VBA procedure in the Access database. Code as follows ;

Code:
Dim acApp As Object
Set acApp = CreateObject("Access.Application")

acApp.OpenCurrentDatabase (m_strDBCopyPath & m_strDBCopyName)
acApp.Visible = True
acApp.Run "Calculate"
    
If m_bCheckCallId = True Then
...
...

The Access procedure (called 'Calculate') can take some time to run (30 mins, maybe longer). While it's running, Excel continually pops up message boxes saying it is "...waiting for an OLE action to complete...". We can ignore these, or we can click OK, but another one will pop up in a short while. It is a bit annoying as, once the Access procedure is complete, Excel won't continue on to the next part of its process until you click 'OK' on the '...waiting for OLE action ..' dialog box.

Is there any way to stop these messages appearing - i.e. any way in the Excel code of forcing it to wait for the Access procedure to complete before it carries on ?

Thanks,
StepOne
 

Users who are viewing this thread

Back
Top Bottom