Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 364
Viewed: 2317
Added: Aug 19, 2002
Snippet uploaded by: snippet
Written By: Clint LaFever
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

' Author: Clint LaFever []
' Purpose: CHyperlink Class is used to launch any associated file on the system.

Class which allows the launching of any file with it`s associated program. Most commonly used to pass a URL or mailto tag to launch the users default browser or email client hence the class name. Remember, this can also be used to launch .DOC, .XLS, or any other registered known file type.

Dim obj as New CHTML obj.ExecuteLink ""
obj.ExecuteLink ""
obj.ExecuteLink App.Path & "\SomeDocument.DOC"

Highlight all by clicking in box

Highlight All
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 Link As String
Public Sub ExecuteLink(Optional pstrLINK As String = "")
On Error Resume Next
Dim lRet As Long
If pstrLINK <> "" Then Link = pstrLINK
If Link <> "" Then
lRet = ShellExecute(0, "open", Link, "", App.Path, SW_SHOWNORMAL)
If lRet >= 0 And lRet <= 32 Then MsgBox "Error jumping to:" & Link, 48, "Warning"
End If
End If
End Sub

No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 All Rights Reserved. Conditions