Can you use TM1 Worksheet Function in your VBA script as any regular Worksheet Function? Are there extra parameters or script you need to write to make it work?
Any useful tips or best practice guide you guys can share with a beginner when utilizing TM1 Worksheet Function via VBA?
TM1 Worksheet Function
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
-
- Site Admin
- Posts: 6645
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TM1 Worksheet Function
You use the Application.Run method.appleglaze28 wrote:Can you use TM1 Worksheet Function in your VBA script as any regular Worksheet Function? Are there extra parameters or script you need to write to make it work?
Any useful tips or best practice guide you guys can share with a beginner when utilizing TM1 Worksheet Function via VBA?
For example:
Code: Select all
MsgBox Application.Run("DBRW", "Server:Cube","Element1","Element2")
This is different from using standard Excel functions, which usually use either the WorksheetFunction property of the Application object, or (undocumented) use the Application object directly.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
Re: TM1 Worksheet Function
Okay...so the only difference would be adding the Applicaton.Run as well as the ServerName should always be included if I'm gonna base the parameters for the Function in the Reference guide.
-
- Site Admin
- Posts: 6645
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TM1 Worksheet Function
You need to use the server name regardless of how you're using the function, unless you're running a local server.appleglaze28 wrote:Okay...so the only difference would be adding the Applicaton.Run as well as the ServerName should always be included if I'm gonna base the parameters for the Function in the Reference guide.
The primary difference is that the function name itself is the first argument that you pass to the Application.Run method.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.