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 Private Const SW_SHOWNORMAL = 1 Private Const ERROR_FILE_NOT_FOUND = 2& Private Const ERROR_PATH_NOT_FOUND = 3& Private Const ERROR_BAD_FORMAT = 11& Private Const SE_ERR_ACCESSDENIED = 5 Private Const SE_ERR_ASSOCINCOMPLETE = 27 Private Const SE_ERR_DDEBUSY = 30 Private Const SE_ERR_DDEFAIL = 29 Private Const SE_ERR_DDETIMEOUT = 28 Private Const SE_ERR_DLLNOTFOUND = 32 Private Const SE_ERR_FNF = 2 Private Const SE_ERR_NOASSOC = 31 Private Const SE_ERR_OOM = 8 Private Const SE_ERR_PNF = 3 Private Const SE_ERR_SHARE = 26 Private Sub Command1_Click() Dim lngResult As Long lngResult = ShellExecute(Me.hwnd, "open", Text1.Text, vbNullString, "", SW_SHOWNORMAL) 'If the function fails, the return value is an error value that is less than or equal to 32. If lngResult >= 33 Then Exit Sub Select Case lngResult Case 0 MsgBox "The operating system is out of memory or resources." Case ERROR_FILE_NOT_FOUND MsgBox "Le document est introuvable." Case ERROR_PATH_NOT_FOUND MsgBox "Le chemin d'accès est introuvable." Case ERROR_BAD_FORMAT MsgBox "The .EXE file is invalid (non-Win32 .EXE or error in .EXE image)." Case SE_ERR_ACCESSDENIED MsgBox "The operating system denied access to the specified file." Case SE_ERR_ASSOCINCOMPLETE MsgBox "The filename association is incomplete or invalid." Case SE_ERR_DDEBUSY MsgBox "The DDE transaction could not be completed because other DDE transactions were being processed." Case SE_ERR_DDEFAIL MsgBox "The DDE transaction failed." Case SE_ERR_DDETIMEOUT MsgBox "The DDE transaction could not be completed because the request timed out." Case SE_ERR_DLLNOTFOUND MsgBox "The specified dynamic-link library was not found." Case SE_ERR_FNF MsgBox "The specified file was not found." Case SE_ERR_NOASSOC MsgBox "Ce type de document n'est pas ASSOCIÉ à une application dans Windows." Case SE_ERR_OOM MsgBox "There was not enough memory to complete the operation." Case SE_ERR_PNF MsgBox "The specified path was not found." Case SE_ERR_SHARE MsgBox "A sharing violation occurred." End Select End Sub>Hi,