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