EssVCancelCalc

Description

Cancels the calculation being run on the server.

Syntax

EssVCancelCalc(sheetName)
ByVal sheetName As Variant

Parameters

sheetName

Text name of the worksheet to operate on. sheetName is of the form "[Book.xls]Sheet". If sheetName is Null or Empty, the active 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 EssVCancelCalc Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant) As Long

Sub CancelCalc()
X = EssVCancelCalc("[Book2.xls]Sheet1")
If X = 0 Then
MsgBox("Calculation canceled.")
Else
MsgBox("Calculation not canceled.")
End If
End Sub

Note:

You cannot cancel synchronous calculations.