COGNOiSe.com - The IBM Cognos Community

Planning & Consolidation => TM1 => Topic started by: shaunybrs on 20 Jan 2016 09:31:01 PM

Title: Error trying to log on to perspectives when calling macro from a VB script
Post by: shaunybrs on 20 Jan 2016 09:31:01 PM
Hi,
I am having issues with a TM1 Perspectives spreadsheet. The spreadsheet works perfectly when I open it from exporer but errors when I call it from a vb script.
The macro inside the spreadsheet does the following:
   Loads tm1p.xla
   Logs in to tm1 - We use Cam security with SSO
   Refreshes the data
   Saves the report as a pdf

When I call the macro from a vb script it gives me an error saying it can not find the file "tm1.xll". I have attached the vb script in excel.

It needs to be called this way as it is scheduled to run out of hours as part of the overnight process.

Any help would be much appreciated.

Shaun
Title: Re: Error trying to log on to perspectives when calling macro from a VB script
Post by: o22paris on 14 Oct 2016 11:12:03 AM
Hi,

I'm experiencing a same kind of issue. The macro works when I run the batch that launch Excel and the macro file manually.

But when the batch is run from a scheduled task, it does not work. After hours of investigation, I think it's because to load tm1p.xla you need the application to be visible due to the Cognos logo. But when you run excel from a scheduled task the application cannot be visible.

Hope someone has a workaround to share...

Aude