WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Excel
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Wait for Excel Add-in to Load

 Keywords: Add-Ins Add Ins Excel Powerpivot Data Mining Unknown Ole Error

I recently started using the Powerpivot and Data Mining Add-Ins for Excel 2010. Have not scripted with them yet, but just had an old script fail to load an .xlsx file with "Unknown Ole Error"

Typical Excel Script (for me starts something like)

oXL = CreateObject("Excel.Application")
If oXL == 0 Then Exit
oXL.Visible = 1 
oXL.ScreenUpdating = 1 
oXL.UserControl = 1
oXL.DisplayAlerts = 0
oXL.WorkBooks.Open(cXLS)
With these new add-ins I had to change to
oXL = CreateObject("Excel.Application")
If oXL == 0 Then Exit
oXL.Visible = 1 
While ! oXL.Ready
TimeDelay(1)
EndWhile
oXL.ScreenUpdating = 1 
oXL.UserControl = 1
oXL.DisplayAlerts = 0
oXL.WorkBooks.Open(cXLS)
These are incredible Add-ins and if you work with Office 2010 - get them, they're free. Depending on your PC/Laptop you may not experience the delay and error... but if you do the above seems to fix it.
Article ID:   W18114
Filename:   Wait for Excel Add-in to Load.txt
File Created: 2012:07:30:07:47:18
Last Updated: 2012:07:30:07:47:18