Vb hyperlink code (1 Viewer)

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
Use the ShellExecute API.

Code:
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

' somewhere in your code
ShellExecute Me.hWnd, vbNullString, "mailto:mail@domain.com", vbNullString, "C:\", SW_SHOWNORMAL
 

velox

Retired
Joined
Mar 19, 2004
Messages
5,521
Location
Where the citi never sleeps.
Gender
Male
HSC
N/A
i tried that but it gives me an error saying constants, blah blah are not allowed as public members of object modules

EDIT : Fixed, sorry i forgot to put it in a module :p
 
Last edited:

hornetfig

Member
Joined
Jun 27, 2004
Messages
65
Location
Sydney. oddly
Gender
Male
HSC
2003
or you can delcare them as Private [members of the class] and keep them in the frm file. It just won't be accessible to other forms and modules.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top