This does not pertain specifically to VBA, but as an FYI:
I write a lot of scripts to automate Excel, but these are executed outside of Excel as macro code is not permitted in the .xls(x) files.
a typical script begins:
which now often fail with the Powerpivot and SQL DataMining add-ins.Code:oXL = CreateObject("Excel.Application")
oXL.Visible = true
adding
the problem is resolved.Code:While ! oXL.ready
...a time delay
EndWhile