HypGetChildren

Data provider types: Essbase

Description

HypGetChildren() returns the children for the specified member.

Syntax

HypGetChildren (vtSheetName, vtMemberName, intChildCount, vtChildArray)

ByVal vtSheetName As Variant

ByVal vtMemberName As Variant

ByVal intChildCount As Integer

ByRef vtChildArray As Variant

Parameters

vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.

vtMemberName: Input parameter; the member name. Required.

intChildCount: Input parameter; a restriction on the number of children returned.

  • ChildCount <=0. All children are returned.

  • ChildCount >0. The result set is limited to the number specified as the argument. If the result set is less than the specified argument, all results are returned.

vtChildArray: Output result vector that contains the list of the children. Its contents are unknown if the macro fails.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Declare Function HypGetChildren Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtMemberName As Variant, ByVal intChildCount As Integer, ByRef vtChildArray As Variant) As Long

Sub Example_HypGetChildren
   Dim vtChildren As Variant
   Dim vtChild As Variant
   Dim X as Long
      X = HypGetChildren (Empty, "Market", 0, vtChildren)
      If IsArray (vtChildren) Then
         For i = LBound (vtChildren) To UBound (vtChildren)
         VtChild = vtChildren (i)
      Next
   End If
End Sub