Strange case I am encountering.
I have a macro in an xlsm file in Excel that would:
- open TM1p.xla
- log on to TM1 with an admin user
- open a report from the Applications folder
- change the report data at the top of the report
- refresh (= rebuild Active form)
- save the report as PDF
- log out from TM1
Opening the xlsm file is done with a simple vbscript file.
If the vbscript file is opened manually, with different Windows users, it always works. The PDF is created and contains the correct data.
If I use ExecuteCommand in TI to open up the VBS file, it starts, the xlsm file is opened, a bunch of other stuff is done but it will not allow me to use:
Code: Select all
Application.Run "N_CONNECT", "TM1_MODEL_NAME", "admin", ""
It somehow stops. But, executing this line of code in Excel with the Windows user under which the TM1 service runs, it works fine.
The error is 1004 which indicates that the macro is not available in the workbook. TM1p.xla is loaded fine at that time.
Is there a change in automating TM1 Perspectives from outside Excel perhaps ?
Excel 2016, recent TM1 version.
A Windows scheduled task that executes the vbscript file has the same issue ! It does not allow me to log on to TM1 using N_Connect.
Security mode 1 is used, native TM1 security.
I recreated the 2 Desktop folders in a Windows subdirectory, this is not the problem.
Thanks a lot !
Wim