Data provider types: Essbase
HypIsExpense() verifies that the member specified has an Expense tag.
HypIsExpense(vtSheetName, vtDimensionName, vtMemberName)
ByVal vtDimensionName As Variant
ByVal vtMemberName As Variant
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.
vtDimensionName: The dimension of the member. If set to Null or Empty, the active dimension is used.
vtMemberName: The member for which to retrieve information. Required; there is no default value.
Returns a variant in which -1 is true, 0 is false; otherwise, returns the appropriate error code.
Declare Function HypIsExpense Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtDimensionName As Variant, ByVal vtMemberName As Variant) As Variant Sub CheckExpense() vtret = HypIsExpense(Empty, "Measures", "Opening Inventory") If vtret = -1 Then MsgBox ("Opening Inventory has expense flag set") ElseIf vtret = 0 Then MsgBox ("Expense flag has not been set") Else MsgBox ("Error value returned is" & vtret) End If End Sub