HypIsAttribute

Data source types: Essbase

Description

HypIsAttribute() checks to see if the specified member has a specific attribute.

Syntax

HypIsAttribute(vtSheetName, vtDimensionName, vtMemberName, vtAttributeName)

ByVal vtSheetName As Variant

ByVal vtDimensionName As Variant

ByVal vtMemberName As Variant

ByVal vtAttributeName As Variant

Parameters

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

vtDimensionName: The name of the dimension where the member belongs.

vtMemberName: The name of the member for which we must test the condition.

vtAttributeName: Input string that is compared against the attributes of the member.

Return Value

Returns a variant in which -1 is true, 0 is false; otherwise, returns the appropriate error code.

Example

Declare Function HypIsAttribute Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtDimensionName As Variant, ByVal vtMemberName As Variant, ByVal vtAttribute As Variant) As Variant

Sub CheckAttribute()
vtret = HypIsAttribute(Empty, "Market", "Connecticut", “MyAttribute”)
    If vtret = -1 Then
      MsgBox ("Found MyAttribute")
    ElseIf vtret = 0 Then
      MsgBox ("MyAttribute not available for Connecticut")
    Else
      MsgBox ("Error value returned is" & vtret)
    End If 
End Sub