VBA Return Values

Smart View VBA functions may return any of the values in Table 2 to indicate success or failure of the function.

  • A return value of zero (0) indicates that the function ran successfully.

  • A return value of 1 or 2 indicates that the function ran successfully, but with a condition.

  • Negative return values indicate client issues.

  • A return value of 4 indicates a server issue.

Table 2. Return Values and Their Descriptions

Return Value Description
4SS_ERR_ERRORAn error specific to the data provider or a generic error that cannot be mapped to a value.
2SS_NO_GRID_ON_SHEET_BUT_FUNCTIONS_SUBMITTED

The function ran successfully; however, the function sheet that was submitted contained no grid.

1SS_SHEET_NOT_CONNECTED_BUT_FUNCTIONS_SUBMITTED

The function ran successfully; however, the function sheet that was submitted was not connected.

0SS_OKThe function ran successfully.
-1SS_INIT_ERRInitialization error.
-2SS_TERM_ERRTermination error.
-3SS_NOT_INITInitialization error.
-4SS_NOT_CONNECTEDThe spreadsheet is not yet connected to the server.
-5SS_NOT_LOCKEDThe spreadsheet is not locked.
-6SS_INVALID_SSTABLE The spreadsheet has become unstable.
-7SS_INVALID_SSDATAThe spreadsheet contains invalid data.
-8SS_NOUNDO_INFONo Undo information exists.
-9SS_CANCELEDOperation has been canceled.
-10SS_GLOBALOPTSNot used.
-11SS_SHEETOPTSNot used.
-12SS_NOTENABLED Undo is not enabled.
-13SS_NO_MEMORYNot enough memory resources are available.
-14SS_DIALOG_ERRORAppropriate dialog box could not be displayed.
-15SS_INVALID_PARAMFunction contains an invalid parameter.
-16SS_CALCULATINGCalculation is in progress.
-17SS_SQL_IN_PROGRESSObsolete setting.
-18SS_FORMULAPRESERVEOperation is not allowed because the spreadsheet is in formula preservation mode.
-19SS_INTERNALSSERROROperation cannot take place on the specified sheet.
-20SS_INVALID_SHEET Current sheet cannot be determined.
-21SS_NOACTIVESHEETSpreadsheet name was not specified and no active sheet is selected.
-22SS_NOTCALCULATINGCalculation cannot be canceled because no calculation is running.
-23SS_INVALIDSELECTIONSelection parameter is invalid.
-24SS_INVALIDTOKENNot used.
-25SS_CASCADENOTALLOWEDCascade list file cannot be created, or you are attempting to cascade while the spreadsheet is embedded in another document.
-26SS_NOMACROSSpreadsheet macros cannot be run due to a licensing agreement.
-27SS_NOREADONLYMACROSSpreadsheet macros which update the database cannot be run due to a licensing constraint.
-28SS_READONLYSSYou have a read-only license and cannot update the database.
-29SS_NOSQLACCESSObsolete setting.
-30SS_MENUALREADYREMOVEDThe menu is removed already.
-31SS_MENUALREADYADDEDThe menu is added already.
-32SS_NOSPREADSHEETACCESSNot used.
-33SS_NOHANDLESNot used.
-34SS_NOPREVCONNECTIONNot used.
-35SS_LROERRORNot used.
-36SS_LROWINAPPACCESSERRNot used.
-37SS_DATANAVINITERRNot used.
-38SS_PARAMSETNOTALLOWEDNot used.
-39SS_SHEET_PROTECTEDThe specified worksheet is protected. Unprotect the worksheet and try the operation again.
-40SS_CALCSCRIPT_NOTFOUNDCalc script not found.
-41SS_NOSUPPORT_PROVIDERProvider not supported.
-42SS_INVALID_ALIASInvalid alias.
-43SS_CONN_NOT_FOUNDConnection not found.
-44SS_APS_CONN_NOT_FOUNDProvider Services connection not found.
-45SS_APS_NOT_CONNECTEDProvider Services not connected.
-46SS_APS_CANT_CONNECTProvider Services cannot connect.
-47SS_CONN_ALREADY_EXISTSConnection already exists.
-48SS_APS_URL_NOT_SAVEDProvider Services URL not saved.
-49SS_MIGRATION_OF_CONN_NOT_ALLOWEDMigration of connection not allowed.
-50SS_CONN_MGR_NOT_INITIALIZEDConnection manager not initialized.
-51SS_FAILED_TO_GET_APS_OVERRIDE_PROPERTYFailed to get Provider Services override property.
-52SS_FAILED_TO_SET_APS_OVERRIDE_PROPERTYFailed to set Provider Services override property.
-53SS_FAILED_TO_GET_APS_URLFailed to get Provider Services URL.
-54SS_APS_DISCONNECT_FAILEDProvider Services disconnect failed.
-55SS_OPERATION_FAILEDOperation failed.
-56SS_CANNOT_ASSOCIATE_SHEET_WITH_CONNECTIONCannot associate sheet with connection.
-57SS_REFRESH_SHEET_NEEDEDWorksheet refresh needed.
-58SS_NO_GRID_OBJECT_ON_SHEETNo grid object on sheet.
-59SS_NO_CONNECTION_ASSOCIATEDNo connection associated.
-60SS_NON_DATA_CELL_PASSEDNon-data cell passed.
-61SS_DATA_CELL_IS_NOT_WRITABLEData cell is not writable.
-62SS_NO_SVC_CONTENT_ON_SHEETNo Smart View content on sheet.
-63SS_FAILED_TO_GET_OFFICE_OBJECTFailed to get Office object.
-64SS_OP_FAILED_AS_CHART_IS_SELECTEDOperation failed because chart is selected.
-65SS_EXCEL_IN_EDIT_MODEExcel in edit mode.
-66SS_SHEET_NON_SMARTVIEW_COMPATIBLESheet not compatible with Smart View.
-67SS_APP_NOT_STANDALONEApplication not stand alone.
-68SS_SMART_VIEW_DISABLEDSmart View is disabled.
-69SS_VBA_DEPRECATEDThe function has been deprecated.
-70SS_OPERATION_NOT_SUPPORTED_IN_MULTIGRID_MODEThe operation is not supported in worksheets that are in multiple grid mode.
-71SS_INVALID_MEMBERThe member name is invalid. Used with HypGetMemberInformation.
-72SS_NO_SV_NAME_RANGENo named ranges are available. Used with HypGetNameRangeList.
-73SS_AMBIGUOUS_MENUThe menu item is ambiguous and could not be resolved. Used with HypExecuteMenu, HypHideRibbonMenu, and HypHideRibbonMenuReset.