Data provider types: Essbase, Planning (ad hoc only), Financial Management (ad hoc only), Hyperion Enterprise (ad hoc only)
HypRemoveOnly() removes only the selected member(s) in the worksheet.
Selection must include only member cells, not data cells.
HypRemoveOnly(vtSheetName, vtSelection)
ByVal vtSelection As Variant
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.
vtSelection: The range object that refers to the member(s) to be removed. If selection is Null or Empty, the active cell is used.
Returns 0 if successful; otherwise, returns the appropriate error code.
To remove only one member name:
Public Declare Function HypRemoveOnly Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtSelection As Variant) As Long Sub Example_HypRemoveOnly() X=HypRemoveOnly(Empty, RANGE("D2")) If X = 0 Then MsgBox("Remove Only successful.") Else MsgBox("Remove Only failed." + X) End If End Sub
To remove multiple member names:
Public Declare Function HypRemoveOnly Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtSelection As Variant) As Long Sub Example_HypRemoveOnly() X=HypRemoveOnly(Empty, RANGE("D2, A5")) If X = 0 Then MsgBox("Remove Only successful.") Else MsgBox("Remove Only failed." + X) End If End Sub