Page 1 of 1

TM1-VBA-Addin in Excel wanted!

Posted: Mon Sep 18, 2023 12:44 pm
by schlemiel29
Hi,
I try to use TM1-functions using VBA in Excel. Despite all research in forums and Google, I didn't get it.
When in VBA editor, I want to make a reference to an TM1 speciifc xla. But I only see the tm1p.xla. This is not enough. When running a statement like

Set TM1Server = CreateObject("TM1.ApplicationServer")

I get an error message. A dll or xla semes to be missing. I installed everything from the setup when installing TM1. It is an old version (2.0.9), where the file dates are from sep 2019.
So what can I do with the actual version of the software? Where is the missing link?
Thanks in advance
Dirk

Re: TM1-VBA-Addin in Excel wanted!

Posted: Mon Sep 18, 2023 1:34 pm
by gtonkin
Please could you explain what you are trying to accomplish, may be easier to advise on the route to follow.

Re: TM1-VBA-Addin in Excel wanted!

Posted: Tue Sep 19, 2023 6:47 am
by schlemiel29
That's simple: I want to run a VBA macro in Excel using TM1 functions.

I think I missed something basically. Installation?
I read about finding some files with .bas in cognis folders to use them first, but I don't have these files on the drive nor the folders they should located in.

Re: TM1-VBA-Addin in Excel wanted!

Posted: Tue Sep 19, 2023 7:26 am
by gtonkin
In perspectives unless you are using the C API, you just use Application.Run("<macro", <par>,...)
This applies to functions like ELCOMP, DBRW, DBRA etc. that you may want to use in macros.

If you are using PAfE then you need to follow here: https://ibm.github.io/paxapi/#set-up
But based on you mentioning TM1p.xla, PAfE is not relevant.

Re: TM1-VBA-Addin in Excel wanted!

Posted: Tue Sep 19, 2023 7:51 am
by schlemiel29
Yes, it works. Thanks a lot!