Open website with default web browser
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
Open your default web browser with any url.
Original Author: Michael Boiko
Code
Create a new module and put this code into it
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const conSwNormal = 1
Put a command button on the form and put this code into it Private Sub Command1_Click()
ShellExecute hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.