I am trying to use a button click to open a webpage on a secure SharePoint site, using SSO (single sign-on). This works in Excel with the hyperlink set as a property to a shape and no VBA or macro (automatically runs Microsoft sign-on dialog box), but not in Access. I receive the error "Unable to open https://company.sharepoint.com/sites/Lean%20Home.aspx. Cannot download the information you requested." Or I get a "Run-time Error '8' Cannot download the information you requested."
If I set the hyperlink in the button properties Hyperlink area, I can open the dialog box, click "bookmark", receive the message that the document has no bookmarks, and then the hyperlink works. It will not work through VBA, and I don't want to manipulate through the bookmarks error to get the hyperlinks property dialog to work.
My generic code is:
Private Sub Cmd_ZD_Homepage_Click()
Application.FollowHyperlink "https://company.sharepoint.com/sites/Lean%20Home.aspx"
End Sub
What do I need to add to the VBA code to work through the SSO portion of the webpage?
Private Sub Cmd_ZD_Homepage_Click() Call PrepHyperlink("https://company.sharepoint.com/sites/Lean%20Home.aspx") strAddress = "https://company.sharepoint.com/sites/Lean%20Home.aspx" Call GoHyperlink("https://company.sharepoint.com/sites/Lean%20Home.aspx") End Sub
I still receive the same error. I am not familiar with public functions, so I assume I am calling it incorrectly in my code for the button click? – LisaGoHyperlink
. That function callsPrepHyperlink
, you don't. – June7