[Resolved] Hyperlinks in Menu Buttons
Can somone help me, i hav tried searching google and MSDN and i cant find anything which tells you how to put a hyperlink in a command button. I have some websites which i want to put in a menu but i need to no the code if there is any which will load them when clicked.
Any help would be much appreaciated
Cheers
Re: Hyperlinks in Menu Buttons
VB Code:
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
Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Sub Command1_Click()
ShellExecute 0&, "OPEN", "http://www.msn.com", vbNullString, "C:\", SW_SHOWNORMAL
' ShellExecute Me.hwnd, "open", "c:\CSP_SNMP.vbs", "router1 Public", "C:\", 1
' c:\ = Destination Folder
End Sub
Re: Hyperlinks in Menu Buttons
Ok That worked, Thanks
Is there a way of makeing the websites load in a new window so that it dosnt overwrite the old one. Say you had 4 websites in 1 menu list and you wanted to load them all.
Cheers