J'ai trouvé
v'al le code
Dim Handle As Long
Dim Retour As String
Dim ShellProg As SHELLEXECUTEINFO
Clipboard.Clear
Clipboard.SetText DocPath
With ShellProg
.cbSize = Len(ShellProg)
.fMask = SEE_MASK_NOCLOSEPROCESS
'le handle de l'appelant
.hwnd = Me.hwnd
'action d'ouverture/execution
.lpVerb = "open"
.lpParameters = ""
.lpFile = App.Path + "\" + "VB.exe"
.lpDirectory = App.Path + "\"
'le display
.nShow = SW_SHOW
End With
'lancement de l'exe externe
Handle = ShellExecuteEx(ShellProg)
If Handle = 0 Then
'erreur
Select Case ShellProg.hInstApp
Case SE_ERR_FNF
MsgBox "Error", vbCritical, "The file " + App.Path + "\" + "VB.exe was not found."
Case Else
MsgBox "Error", vbCritical, "An unexpected error occured."
End Select
LockDoc = False
Else
'boucle pour attendre que le process finisse
Do
DoEvents 'attente d'evenements externe
Handle = WaitForSingleObject(ShellProg.hProcess, 0)
Loop While Handle = WAIT_TIMEOUT
Retour = Clipboard.GetText
MsgBox "eokok", , "fini" + Retour
LockDoc = True
End If
---------------
Il suffit de me dire de me taire...