Modules
Launch URL or Navigate
- Creator:
- byron
- Submitted:
- Dec 11 2006 at 10:46 pm
- Last Updated:
- Dec 11 2006 at 10:46 pm
Download Module
Begin your download of this module (21.8 KB total download).
Description
Uses the VBA code found here:
http://vbcity.com/forums/faq.asp?fid=6&cat=Shell
to launch a URL or navigate to a location. The code is:
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
Private Const SW_SHOW = 1
Public Sub Navigate(ByVal NavTo As String)
Dim hBrowse As Long
hBrowse = ShellExecute(0&, "open", NavTo, "", "", SW_SHOW)
End Sub