EssVZoomIn

Description

Retrieves and expands data from Essbase based on the selected members.

Syntax

EssVZoomIn(sheetName, range, selection, level, across)
ByVal sheetName As Variant
ByVal range As Variant
ByVal selection As Variant
ByVal level As Variant
ByVal across As Variant

Parameters

sheetName

Text name of worksheet to operate on. sheetName is of the form "[Book.xls]Sheet". If sheetName is Null or Empty, the active worksheet is used.

range

Range object which refers to the data to be used as the source of the zoom. If range is Null or Empty, the whole worksheet is used.

selection

Range object which refers to the members that are zoomed. If selection is Null or Empty, the active cell is used.

level

Number indicating the granularity of the zoom. Table 20 describes level numbers and actions.

Table 20. Level Numbers and Actions

LevelAction

1

Next level

2

All levels

3

Bottom level

4

Sibling level

5

Same level

6

Same generation

7

Calc level

If level is Null or Empty, 1 is used.

Note:

You can use the Level Constants instead of 1-7 to set the zoom-in level (see VBA Level Constants).

across

Boolean value indicating whether top-level members of a dimension (for example, Products in Sample Basic) should be zoomed across. A True value indicates that the data should be displayed across while a False value indicates that the data should be displayed downward. If across is Null or Empty, False is used. across is meaningful only for top-level members, also known as dimension or title members.

Return Value

Returns 0 if successful. A negative number indicates a local failure (see VBA Return Values). A return value greater than zero indicates a failure on the server.

Example

Declare Function EssVZoomIn Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal range As Variant, ByVal selection As Variant, ByVal level As Variant, ByVal across As Variant) As Long

Sub ZoomData()
X=EssVZoomIn("[Book2.xls]Sheet1", Null, RANGE("B3"), 1, FALSE)
If X = 0 Then
   MsgBox("Zoom successful.")
Else
   MsgBox("Zoom failed.")
End If
End Sub