How can I open a webpage using the default browser?
Printable View
How can I open a webpage using the default browser?
that takes care of the declares now the functionCode:'declares for shell by association
Public 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 SW_SHOW As Integer = 5
Public Const SW_NORMAL = 1
ShellExecute will open, print, etc.. files by whatever is set in their file association info (.doc will open in Word, .xls in Excel....)Code:ShellExecute 0&, "open", YourURLHere,vbNullString, vbNullString, SW_NORMAL