TM1 Active Form + Recalculate
Posted: Wed Oct 17, 2012 10:27 pm
Hello,
I am trying to manipulate between 2 cubes on an active form. In other words, if I have Cube 1, I would like the Active Form to use a certain dimension, and based on that information recalculate the sheet and update the Active Form.
If I do so manually, it works: Select the cube name from a cell, the next dimension updates. Press F9, then "Rebuild Current Sheet". The Active Form based on the information updates and all data is displayed. Same for Cube 2.
Now I include the code in VBA
It works for the first cube just fine, but it doesn't update the second cube and instead shows me an empty Active Form with the necessary information updated on the non-Active form parts. What should I do? Thank you so much.
I am trying to manipulate between 2 cubes on an active form. In other words, if I have Cube 1, I would like the Active Form to use a certain dimension, and based on that information recalculate the sheet and update the Active Form.
If I do so manually, it works: Select the cube name from a cell, the next dimension updates. Press F9, then "Rebuild Current Sheet". The Active Form based on the information updates and all data is displayed. Same for Cube 2.
Now I include the code in VBA
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
Set myRange = Range("C30")
If (myRange.Select) Then
Application.Run "TM1Refresh"
tm1p.TM1RebuildCurrentSheet
End If
End Sub