EssVPivot

Description

Transposes worksheet rows and columns, based on the selected dimension.

Syntax

EssVPivot(sheetName, range, startPoint, endPoint)
ByVal sheetName As Variant
ByVal range As Variant
ByVal startPoint As Variant
ByVal endPoint 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.

range

Range object which refers to the data to be used as the source of the pivot. If range is Null or Empty, the whole worksheet is used.

startPoint

Range object which refers to the single cell starting point of the pivot. If startPoint is Null or Empty, the active cell of the worksheet is used.

endPoint

Range object which refers to the single cell ending point of the pivot. If endPoint is Null or Empty, the active cell of the worksheet is used.

Return Value

Returns 0 if successful. A negative number indicates a local failure (see VBA Return Values). A return value greater than zero indicates a failure on the server.

Example

Declare Function EssVPivot Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal range As Variant, ByVal startPoint As Variant, ByVal endPoint As Variant) As Long

Sub DoPivot()
X=EssVPivot("[Book2.xls]Sheet1", RANGE("A1:E6"), RANGE("B2"), RANGE("D1"))
If X = 0 Then
   MsgBox("Pivot successful.")
Else
   MsgBox("Pivot failed.")
End If
End Sub