|
-
Aug 24th, 2000, 12:17 PM
#1
Thread Starter
Lively Member
How do I make a hyperlink for a click?
Private Sub WebSite_Click()
???????????????????????
End Sub
-
Aug 24th, 2000, 12:23 PM
#2
Try this:
Code:
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 Sub WebSite_Click()
'Open http://www.vb-world.net
Retval = ShellExecute(0&, vbNullString, "www.vb-world.net", vbNullString, "C:\", 1)
End Sub
-
Aug 24th, 2000, 12:25 PM
#3
Addicted Member
Add this to the click event
Code:
Public Const URL = "http://www.vb-world.net"
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_SHOWNORMAL = 1
Public Sub gotoweb()
Dim Success As Long
Success = ShellExecute(0&, vbNullString, URL, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
Got this from a program off of this site.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|