Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Getting an error when using HypModifyConnection to update the report connection

Summary:

Trying to use HypModifyConnection but getting this error message:


Code Snippet (add any code snippets that support your topic, if applicable):

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

Sub Macro1()

' Macro1 Macro

Connection_String = Range("D5").Value

  'modify url in a particular workbook for all SV sheets

  s = HypModifyConnection("Change Connections.xlsm", "Sheet2", "", "", Connection_String, "", "", "")

End Sub


The cell D5 contains the server connection string:


When I run this macro, I'm getting an error message - see above. I tried to remove Sheet2 and the file name, to update all sheets in the workbook, to no avail. Same error code.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!