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
rsernowskiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Maybe this.....

Shell (Environ("UserProfile") & "\AppData\Local\Google\Chrome\Application\Chrome.exe -url https://google.ca")

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
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

rsernowskiAuthor Commented:
Thanks a bunch

This worked !
Have a nice weekend
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome. Glad I could help.
Thanks and you too. :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.