Data source types: Essbase, Planning (ad hoc only), Financial Management (ad hoc only), Hyperion Enterprise (ad hoc only)
HypPivot() transposes spreadsheet rows and columns, based on the selected dimension.
HypPivot(vtSheetName, vtStart, vtEnd)
ByVal vtSheetName As Variant
ByVal vtStart As Variant
ByVal vtEnd As Variant
vtSheetName: For future use. Currently the active sheet is used.
vtStart: Range object which refers to the single cell starting point of the pivot.
vtEnd: Range object which refers to the single cell ending point of the pivot
Returns 0 if successful; otherwise, returns the appropriate error code.
Declare Function HypPivot Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtStart As Variant, ByVal vtEnd As Variant) As Long
Sub DoPivot()
X=HypPivot(Empty, RANGE("B2"), RANGE("D1"))
If X = 0 Then
MsgBox("Pivot successful.")
Else
MsgBox("Pivot failed.")
End If
End Sub