Use vba to zoom in on multiple members in SmartView
941590Jun 4 2012 — edited Jun 4 2012Hi,
I am using SmartView 11.1.1.3.5.
I have multiple members shown on a single row in a spreadsheet that I want to zoom-in on. For example:
ColumnA ColumnB ColumnC
Cost Center Projects Accounts
I am trying to write VBA code that will allow me to zoom-in on these multiple members in SmartView to the BOTTOM LEVEL (I already have my suppress zeros/#missing checked so I won't end up with a zillion rows of data). The macro will loop so that data will be retrieved on several sheets. I noticed that I have to re-activate for each member that I want to zoom-in on, so I incorporated code for that. Here's what I have so far:
****Code to activate before the zoom-in (keep in mind the connection has already been created):****
Sub ActivateSheet()
Dim username As Variant
Dim password As Variant
Dim x As Variant
Dim HYP_ANALYTIC_SERVICES As Variant
HYP_ANALYTIC_SERVICES = "ESSBASE"
username = ""
password = ""
x = HypConnect(Empty, username, password, "SV Templates Basic")
End Sub
*********************************
Sub DeptZoom()
Dim x As Long
For I = 2 To Sheets.Count - 1
Sheets(I).Select
Call ActivateSheet
x = HypZoomIn(Null, range("A8"), 3, False)
Next
End Sub
*********************************
Sub ProjectZoom()
Dim x As Long
For I = 2 To Sheets.Count - 1
Sheets(I).Select
Call ActivateSheet
x = HypZoomIn(Null, range("B8"), 3, False)
Next
End Sub
*********************************
Sub AccountZoom()
Dim x As Long
For I = 2 To Sheets.Count - 1
Sheets(I).Select
Call ActivateSheet
x = HypZoomIn(Null, range("C8"), 3, False)
Next
End Sub
The problem is - ONLY the data in Column A gets retrieved to the bottom level (3). The other two columns of data only go down to the next level (1).
How can I get the macro to drill all the data down to the BOTTOM LEVEL??
Thanks!!
Edited by: 938587 on Jun 4, 2012 3:29 PM
Edited by: 938587 on Jun 4, 2012 3:30 PM