How to open Chrome and launch website using Excel VBA

Опубликовано: 21 Март 2026
на канале: ST: Excel Guru
2,846
7

Copy the code below
Sub OpenChromeWithFacebook()
Dim chromePath As String
Dim websiteURL As String

' Set the path to the Chrome executable
chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"

' Set the URL of the webpage you want to open
websiteURL = "https://www.facebook.com"

' Launch Chrome and open the specified webpage
Shell chromePath & " " & websiteURL, vbNormalFocus
End Sub