VBA Return Values

Smart View VBA functions return any of the following values to indicate success or failure of the function. Negative numbers represent client issues; positive numbers represent server issues. Table 14 lists the return values.

Table 14. VBA Return Values

Return Value

Definition

0

Function ran successfully

1

Typically, the user pressed Escape or clicked Cancel from a dialog box.
Large positive numberFailure because of server problem; for example, server not running or an invalid user name.

-1

Valid return value, True

-2

Termination error

-3

Initialization error

-4

Spreadsheet is not yet connected to the server

-6

Not used

-7

Spreadsheet has become unstable

-8

No Undo information exists

-9

Operation has been canceled

-12

Undo is not enabled

-13

Not enough memory resources are available

-14

Appropriate dialog box could not be displayed

-15

Function contains an invalid parameter

-16

Calculation is in progress

-17

Obsolete setting

-18

Operation is not allowed because the spreadsheet is in formula preservation mode

-19

Operation cannot take place on the specified sheet

-20

Current sheet cannot be determined

-21

Spreadsheet name was not specified and no active sheet is selected

-22

Calculation cannot be canceled because no calculation is running

-23

Selection parameter is invalid

-25

Cascade list file cannot be created, or you are attempting to cascade while the spreadsheet is embedded in another document

-26

Spreadsheet macros cannot be run due to a licensing agreement

-27

Spreadsheet macros which update the database cannot be run due to a licensing constraint

-28

Database cannot be updated because you have a read-only license for the database

-29

Obsolete setting

-30

Menu is removed already

-31

Menu is added already

-39

The specified worksheet is protected. Unprotect the worksheet and try the operation again.

-40

Calc script not found.

-41Provider not supported
-42Invalid alias
-43Connection not found
-44Provider Services connection not found
-45Provider Services not connected
-46Provider Services cannot connect
-47Connection already exists
-48Provider Services url not saved
-49 Migration of Connection Not Allowed
-50Connection manager not initialized
-51 Failed to Get Provider Services Override Property
-52Failed to Set Provider Services Override Property
-53 Failed to Get Provider Services URL
-54Provider Services disconnect failed
-55Operation failed
-56Cannot associate sheet with connection
-57Refresh sheet needed
-58No grid object on sheet
-59No connection associated
-60Non data cell passed
-61Data cell is not writeable
-62No Smart View content on sheet
-63Failed to get Office object
-64Operation failed as chart is selected
-65Excel in edit mode
-66Sheet not compatible with Smart View
-67Application not stand alone
-68Smart View is disabled.
-69 The function has been deprecated.
-70The operation is not supported in worksheets that are in multiple grid mode.