Hi All,
I am trying to get the VUSLICE macro with the SUBDEFINE macro to run through all the cost centres I have in the cost centre element and from that creat files.
The problem I am having is that I can not get the subdefine to work. The vuslice always returns the same view that I have it stored as in the cube. It does not update and run through the costs centres.
Code so far:
Sub Attempt1()
iNumCentres = Run("SUBSIZ", "tm1serv:CostCentres", "SingleCC")
For Element_Index = 1 To iNumCentres
Run "M_CLEAR"
tm1CostCentre = Run("SUBNM", "tm1serv:CostCentres", "SingleCC", Element_Index)
Sheets("VUSLICE").Select
ActiveSheet.Cells.Select
Selection.Clear
Range("A1").Select
Range("A1").Value = tm1CostCentre
Run "Subdefine", "tm1serv:CostCentres", "SingleCC", Range("A1")
Run "VUSLICE", "tm1serv:Budget_Detail", "BudgetTemplate"
Next Element_Index
End Sub
All views are public, "SingleCC" is a view in the CostCentre subset of the Budget_Detail cube and "BudgetTemplate" is a view in the Budget_Detail cube.
I am totally new to this, and may have used the wrong words to describe what I am trying to get to. So any help would be appreciated, or any questions to help clarify my mumbo jumbo!
Thanks,
T
VUSLICE & SUBDEFINE HELP!
-
- Posts: 1
- Joined: Tue Aug 07, 2012 3:50 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007
VUSLICE & SUBDEFINE HELP!
Ecel 2007, TM1 Perspectives 9.5.2
Help! I am a beginner at VBA and know nothing about TM1!
Help! I am a beginner at VBA and know nothing about TM1!
-
- MVP
- Posts: 3241
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: VUSLICE & SUBDEFINE HELP!
Indeed, you are mixing up words here and there.
But fundamentally, why not using the Print reports functionality?
But fundamentally, why not using the Print reports functionality?
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly