Link to home
Start Free TrialLog in
Avatar of rsernowski
rsernowskiFlag for Afghanistan

asked on

chrome from Excel VBA

Hi

i just want   my chrome browser to go to a specfic website.  I understand chrome doesn't recognize the parameters to put in user and password.  that is ok . but I would like the vba to be non specfic to a user. I tried using ENVIRON,

this works:

what do I need to add so that it is not user desktop specific

Sub My_Website()

   

Dim chromePath As String
Dim WebURL As String
 CreateObject("WScript.Shell").Run chrome & " " & param, 0, False

Shell ("C:\Users\nameed\AppData\Local\Google\Chrome\Application\Chrome.exe -url https://google.ca")

End Sub
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This also worked for me.....

Sub OpenChrome()
Dim ChromePath As String
ChromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Shell (ChromePath & " -url http:google.ca")
End Sub

Open in new window

Avatar of rsernowski

ASKER

Thanks a bunch

This worked !
Have a nice weekend
You're welcome. Glad I could help.
Thanks and you too. :)