Suppress "Microsoft Office Excel is waiting for another application to complete an OLE action."

baldmosher

New Member
Joined
Jul 10, 2009
Messages
32
Lots of info about this but not much to help me that I could find.

In my case it's Access; the message pops up in Excel after a few seconds (and if I click OK, it pops back up after a few seconds) until Access has finished doing its thing, at which point clicking OK then just carries on with the macro.

It's not particularly annoying as Access carries on working in the background, but it does stop the rest of the Excel macro continuing so I can't believe there's not a very simple way to suppress it in VBA code, such as telling Excel to wait until the Access Application has finished its task before carrying on with the next line of code.

Is there an easy solution to this? Perhaps there isn't....

Code:
Sub update_database()

Const dbn As String = "MyDatabase.mdb"
Const macn As String = "reload ALL"
Const objn As String = "Access.Application"

Dim pth As String
pth = ThisWorkbook.Path & "\"

Dim A As Object
Set A = CreateObject(objn)
A.Visible = False
A.OpenCurrentDatabase (pth & dbn)
[B]A.DoCmd.RunMacro macn
[/B]A.CloseCurrentDatabase
A.Quit
Set A = Nothing

End Sub
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,206,920
Messages
6,075,575
Members
446,147
Latest member
homedecortips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top