EssVGetMemberInfo

Description

Returns member relationship information.

Syntax

EssVGetMemberInfo(sheetName, mbrName, action, aliases)
ByVal sheetName As Variant
ByVal mbrName As Variant
ByVal action As Variant
ByVal aliases 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.

mbrName

Text name of the member for which relationship information is obtained. This parameter is required because no default value exists.

action

Number indicating what type of relationship information is returned, as shown in Table 9. If action is Null or Empty, a value of EssChildLevel is used.

See VBA Level Constants.

Table 9. Action Parameter Numbers

ConstantActionDescription

EssChildLevel

1

Next level

EssDescendentLevel

2

All levels

EssBottomLevel

3

Bottom level

EssSiblingLevel

4

Sibling level

EssSameLevel

5

Same level

EssSameGenerationLevel

6

Same generation

EssCalculationLevel

7

Calc level

EssParentLevel

8

Previous or parent level

EssDimensionLevel

9

Dimension member belongs to

aliases

Boolean indicating whether alias names are returned. If aliases is Null or Empty, False is used.

Return Value

Returns a string array of member names if successful. Otherwise, it returns an error number indicating failure.

Example

Declare Function EssVGetMemberInfo Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal mbrName As Variant, ByVal action As Variant, ByVal aliases As Variant) As Variant

Declare Function EssVFreeMemberInfo Lib "ESSEXCLN.XLL" (ByRef memInfo As Variant) As Long

Const EssBottomLevel = 3

Sub GetMemberInfo()
Dim vt As Variant
Dim cbItems As Variant
Dim i As Integer
Dim pMember As String

vt = EssVGetMemberInfo(Null, "Organization", EssBottomLevel, False)
If IsArray(vt) Then
cbItems = UBound(vt) + 1
MsgBox("Number of elements = " + Str(cbItems))
For i = 0 to UBound(vt)
MsgBox("Member = " + vt(i))
Next
Else
MsgBox("Return Value = " + Str(vt))
End If
X = EssVFreeMemberInfo(vt)
End Sub