I could not find “Microsoft Excel Library” in Toos->References.
Also checked by adding “Microsoft Office 9.0 Object Library” but still giving same error.
Please suggest if any other library needs to be added.
Im having the similar problem when trting to run a scheduled vbs script. The script has to create a busobj process. Only thing is, when there is already a busobj process present on the server it gives me the following error:
ActiveX cannot create object.
Have you checked if there are any Excel processes running while you are executing your code? If yes, then terminiate these processes and execute the code again.
Judging the error you got, the code you are using can compile, so it isn’t a problem with the references you have.
I’ve not tried this with VB scripts, but I use the following with VBA:
Dim BOApp as busobj.Application
'start BusObj, careful not to grab an existing session
Set BOApp = New busobj.Application
Do Until BOApp.Variables("BOUSER").Value = ""
Set BOApp = New busobj.Application
Loop
Thnx Dwayne, tried your solution, but to no avail. It works well with VBA but not with .vbs script. I keep getting a COM error. This was explainend in another trhread i thougth.
Assessing the problem further I have discovered that my .vbs script will not execute because one of the libraries i need is beying accessed (don’t whether this is good English) by another sceduled report. That is wat gave me the ActiveX error
Now trying to call the macro in the after refresh event.
A post on the forum scared me though. I’m working with a client where we have installed BOXI r2 SP2. According to the post i’ve read VB code won’t execute in the after refresh event. I won’t execute at all. I’ve tested this with a simle report and the follwong vb-code:
Private Sub AfterRefresh()
ThisDocument.ExportasPDF("path")
End sub
This works when i refresh the report in desktop intelligence but doesn’t work when i schedule the same report.
That brings me to my question:
Is it really true that VB will not execute once you have installed SP2?
Dwayne: have we confirmed that BO considers the failure to execute document event procedures using VBA with scheduled DeskI documents a failure they are going to correct?