データ・プロバイダ・タイプ: Essbase、Planning、Financial Management、Hyperion Enterprise
HypGetCellRangeForMbrCombination()は選択したメンバーの組合せのセル範囲を取得します。
HypGetCellRangeForMbrCombination (vtSheetName, vtDimNames, vtMbrNames, vtCellIntersectionRange)
By Val vtSheetName As Variant
ByRef vtDimNames As Variant
ByRef vtMbrNames As Variant
ByRef vtCellIntersectionRange As Variant
vtSheetName: 関数を実行するワークシートの名前。vtSheetNameがNullまたはEmptyの場合、アクティブ・ワークシートが使用されます。
vtDimNames: 入力変数; 次元名の配列
vtMbrNames: 入力変数; 次元に対応するメンバー名の配列(同じ順序)
vtCellIntersectionRange: 出力変数; グリッドのセルの範囲
正常に終了した場合はSS_OKを戻し、それ以外の場合は該当するエラー・コードを戻します。
Public Declare Function HypGetCellRangeForMbrCombination Lib "HsAddin" (ByVal vtSheetName As Variant, ByRef vtDimNames() As Variant, ByRef vtMbrNames() As Variant, ByRef vtCellIntersectionRange As Variant) As Long Sub Example_HypGetCellRangeForMbrCombination() Dim oRet As Long Dim oSheetName As String Dim oSheetDisp As Worksheet Dim vtDimNames(3) As Variant Dim vtMbrNames(3) As Variant Dim vtReturnCellRange As Variant Dim oRange As Range 'oSheetName = Empty 'Set oSheetDisp = Worksheets(oSheetName$) vtDimNames(0) = "Measures" vtDimNames(1) = "Market" vtDimNames(2) = "Year" vtDimNames(3) = "Product" 'vtDimNames(4) = "" vtMbrNames(0) = "Sales" vtMbrNames(1) = "New York" vtMbrNames(2) = "Year" vtMbrNames(3) = " Product" 'vtMbrNames(4) = "" oRet = HypGetCellRangeForMbrCombination ("", vtDimNames, vtMbrNames, vtReturnCellRange) If (oRet = 0) Then Set oRange = vtReturnCellRange End If End Sub