HypGetDimMbrsForDataCell

Data source types: Essbase, Planning, Financial Management, Hyperion Enterprise

Description

HypGetDimMbrsForDataCell() retrieves the entire set of dimension members for a data cell.

Syntax

HypGetDimMbrsForDataCell (vtSheetName [in], vtCellRange [in], vtServerName [out], vtAppName [out], vtCubeName [out], vtFormName [out], vtDimensionNames [out], vtMemberNames [out])

ByVal vtSheetName As Variant

ByVal vtCellRange As Variant

ByRef vtServerName As Variant

ByRef vtAppName As Variant

ByRef vtCubeName As Variant

ByRef vtFormName As Variant

ByRef vtDimensionNames As Variant

ByRef vtMemberNames As Variant

Parameters

vtSheetName: For future use. Currently the active sheet is used.

vtCellRange: Range of the cell (one cell only) whose writability must be checked.

pvtServerName: Name of the server the associated connection on the sheet is connected to

pvtApplicationName: Name of the application the associated connection on the sheet is connected to

pvtCubeName: Name of the cube /database (Plan Type in Planning) the associated connection on the sheet is connected to

pvtFormName: Name of the form the associated connection on the sheet is connected to (in ad hoc grids, this is returned as empty string)

pvtDimensionNames: Array of dimension names

pvtMemberNames: Array of member names

Return Value

Returns SS_OK if successful; otherwise, the appropriate error code.

Example

Public Declare Function HypGetDimMbrsForDataCell Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtCellRange As Variant, _ ByRef vtServerName As Variant, ByRef vtAppName As Variant, _ ByRef vtCubeName As Variant, ByRef vtFormName As Variant, _ ByRef vtDimensionNames As Variant, ByRef vtMemberNames As Variant) As Long

Sub TestGetDimMbrsForDataCell()

Dim oRet As Long
Dim oSheetName As String
Dim oSheetDisp As Worksheet
Dim vtDimNames As Variant
Dim vtMbrNames As Variant
Dim vtServerName As Variant
Dim vtAppName As Variant
Dim vtCubeName As Variant
Dim vtFormName As Variant
Dim lNumDims As Long
Dim lNumMbrs As Long
Dim sPrintMsg As String

oSheetName = Empty
Set oSheetDisp = Worksheets(oSheetName$)
oRet = HypGetDimMbrsForDataCell("", oSheetDisp.Range("B2"), vtServerName, vtAppName, vtCubeName, vtFormName, vtDimNames, vtMbrNames)

If (oRet = SS_OK) Then
    If IsArray(vtDimNames) Then
        lNumDims = UBound(vtDimNames) - LBound(vtDimNames) + 1
    End If

    If IsArray(vtMbrNames) Then
        lNumMbrs = UBound(vtMbrNames) - LBound(vtMbrNames) + 1
    End If

    sPrintMsg = "Number of Dimensions = " & lNumDims & "  Number of Members = " & lNumMbrs & " Cube Name - " & vtCubeName
    MsgBox (sPrintMsg)
End If

End Sub