Describes the Oracle Smart View for Office VBA function, HypModifyConnection.

Data provider types: Oracle Essbase, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting


HypModifyConnection() is used to modify any connection information for a workbook, sheet, range, or grid. Applies to:

  • Regular ad hoc sheet

  • Multiple-grid ad hoc sheet

  • Form-based sheet


Private Declare PtrSafe Function HypModifyConnection Lib "HsAddin" (vtDocumentName, vtSheetName, vtGridName As Variant, vtServer, vtURL, vtApp, vtDB, vtConnParam) As Long

ByVal vtDocumentName As Variant

ByVal vtSheetName As Variant

ByVal vtGridName As Variant

ByVal vtServer As Variant

ByVal vtURL As Variant

ByVal vtApp As Variant

ByVal vtDB As Variant

ByVal vtConnParam As Variant


vtDocumentName: The name of the workbook on which to run the function. If vtDocumentName is Null or Empty, the active workbook is used.

vtSheetName: The name of the worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.

vtGridName: Name range of a grid on a multiple-grid worksheet. If vtGridName is Null or Empty, and the sheet is a multiple-grid sheet, then the connection information of all grids on the sheet will be modified.

vtServer: The name of the new server; the application must reside in the new server

vtURL: The new data provider URL

vtApp: The new application name

vtDB: The new cube or database name

vtConnParam: Any additional provider parameters


The user must save the workbook for the connection changes to persist.


Sub testModifyConnection()
   'modify url in a particular workbook for all SV sheets
   s = HypModifyConnection("testmultigrid.xlsm", "", "", "", "http://<server>:<port>/aps
         /SmartView", "", "", "")
   'modify app/db for a specific multi-grid in a workbook
   s = HypModifyConnection("testmultigrid.xlsm", "Sheet1", 
         "Demo15FCFBC11_9D65_4555_94AC_6EDD429438B0_1", "", "", "NoUniq", "NoUniq", "")
   'modify url for all sheets in active workbook
   s = HypModifyConnection("", "", "", "", "http://<server>:<port>/aps/
         SmartView", "", "", "")
   'modify url in a particular sheet for active workbook
   s = HypModifyConnection("", "Sheet1", "", "", "http://<server>:<port>/aps/
         SmartView", "", "", "")
End Sub