Hyper-link / mailto

By | 2002-06-01

Easily lets you add a link from you VB application or open default email program.

Original Author: Ej Jones

Inputs

textbox

Assumptions

Follow these instructions and you should have no problems.
1. Open new project
2. Place two text boxes on the form
3. Place two command buttons on form
4. Copy and paste code on form

Returns

Open specific web site, or default email

Code

Private Sub Command1_Click()
Dim x
x = Shell("start.exe " & Text1, 0)
End Sub
Private Sub Command2_Click()
Dim x
x = Shell("start.exe mailto:" & Text1, 0)
End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.