Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _<br>
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _<br>
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long<br>
<br>
Function ShellToBrowser%(Frm As Form, ByVal URL$, ByVal WindowStyle%)<br>
Dim api%<br>
api% = ShellExecute(Frm.hwnd, "open", URL$, "", App.path, WindowStyle%)<br>
'Check return value<br>
If api% < 31 Then<br>
'error code - see api help for more info<br>
MsgBox App.Title & " had a problem running your web browser.You should check that your browser is correctly installed.(Error" & Format$(api%) & "

", 48, "Browser Unavailable"<br>
ShellToBrowser% = False<br>
Else<br>
If api% = 32 Then<br>
'no file association<br>
MsgBox App.Title & " could not find a file association for URL$ &" _<br>
& " on your system. You should check that your browser is correctly installed and associated with this type of file.", 48, _<br>
"Browser Unavailable"<br>
ShellToBrowser% = False<br>
Else 'It worked!<br>
ShellToBrowser% = True<br>
End If<br>
End If<br>
End Function<br>
<br>
Private Sub cmdEmail_Click()<br>
Dim success As Integer<br>
Dim site As String<br>
If Trim(email_adres.Text) = "" Then<br>
MsgBox "U heeft géén email adres opgegeven", vbCritical, ""<br>
Else<br>
site = "mailto:" & Trim(email_adres.Text)<br>
End If<br>
success% = ShellToBrowser(Me, site, 0)<br>
<br>
End Sub<br>
<br>
Eric De Decker