How to Open New URL on Current opened Browser
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 'Internet - How to Open New URL on Current opened Browser Option Explicit Private 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 Sub OpenURL(ByVal sUrl As String) Call ShellExecute(0&, "Open", sUrl, vbNullString, vbNullString, vbNormalFocus) End Sub Sub Main() 'Call this function as: Call OpenURL("www.google.com") End Sub |