Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE action message

Status
Not open for further replies.

Molby

Technical User
May 15, 2003
520
GB
Hi All,

I am running a macro in Access from Excel using:

Set acApp = CreateObject("Access.Application")
acApp.Visible = True
acApp.OpenCurrentDatabase ("C:DATABASE.mdb")
acApp.DoCmd.RunMacro "MacName"

However it takes a long time to run, and Excel keeps giving me a message saying, "Microsoft Excel is waiting for another application to complete an OLE action." Is there a way of switching this off, or extending the time that Excel waits for OLE actions?

Thanks,

Ian
 
try Application.ODBCTimeout = Wait_in_Seconds

Setting the wait to zero waits forever.

I don't know if it will affect ActiveX objects but its worth a shot. Also, have you tried turning off Excel messages?

Application.Displayalerts = False

You can also try setting up Access using the shell command , AppActivate, and SendKeys with the wait parameter set to false. But, that's much more tricky and prone to timing issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top