Chrome browser from Visual Basic Applications

Asked By 10 points N/A Posted on -
qa-featured

 

Hello expert, I am studying visual basic. Recently I am trying to Chrome browser from Visual Basic Applications. But unfortunately unable to open it. Please suggest some websites to get a web vba chrome copy. 

SHARE
Best Answer by John L Krug
Best Answer
Best Answer
Answered By 10 points N/A #171012

Chrome browser from Visual Basic Applications

qa-featured

 

Hi david,

Please follow this instruction, i hope you will solve your problem,

————–

run the chrome exe with a url as the first arg

chrome.exe xkcd.com

So something like…

Process.Start("pathToChrome\chrome.exe", "xkcd.com")

———————–

You can get more information from here: https://stackoverflow.com/questions/15200807/open-chrome-browser-in-vb-web-browser-control

Answered By 0 points N/A #171014

Chrome browser from Visual Basic Applications

qa-featured

Since Chrome does not support ActiveX, there is no native function for opening it from Visual Basic Applications. However, there are workarounds, one of them being to use this line of code:

shell("C:UsersUSERNAMEAppDataLocalGoogleChromeApplicationChrome.exe -url http:google.ca")

Another way is to use this code:

Sub test544()

Dim chromePath As String

chromePath = “””C:Program FilesGoogleChromeApplicationchrome.exe”””

Shell (chromePath & ” -url http:google.ca”)

End Sub 

Related Questions