I think you're misunderstanding the function.
Originally Posted by ranbo
GetObject(..) grabs an instance of an app that's already running.
ActiveXObject(..) creates a new instance of an app.
if you use GetObject(..) and an instance isn't running you'll get an error, you can try GetObject(..) like this:
Having said that you'd probably be happier using ADO. I've tested ADO verses XL in different environments and found ADO to be 4 times faster simply because you don't need to start and/or direct XL
return new ActiveXObject(app+'.Application')