Excel VBA - When opening Hyperlink in chrome, my current sign-on to Lightspeed is Invalid?

80 Views Asked by At

I have been building a rather large Excel program for adding and editing Tags in lightspeed Retail POS since they have a rather weak interface.

At times, it would be nice to have a command button to open the product page in Lightspeed to double check a detail. I added a command button to my form and attached the code:

ActiveWorkbook.FollowHyperlink Address:="https://us.merchantos.com/?name=item.views.item&form_name=view&id=" & Cells(2,1) & "&tab=details"

Cells(2,1) contains the item ID

If I open a tab and paste the contents of that address link, the item detail page opens perfectly.

If I click the command Button, The tab opens in Chrome, but it assumes I am not logged in and asks for a username and password. Once supplied, I end up on the home page and not the item detail page.

What am I missing?

1

There are 1 best solutions below

0
Country Christmas Loft On

There was a security Setting for Chrome which throws the login issue.

The solution was to open the link using Shell

chromeFileLocation = """C:\Program Files 
(x86)\Google\Chrome\Application\chrome.exe"""
Shell (chromeFileLocation & "-url " & Link)

This bypasses the security and opens the link on a new Tab.