Salut,
J'ai le code suivant et je voudrai savoir pourquoi quand je fais en mode pas a pas avec F8 tout se passe bien et pourquoi il saute les shellexecute quand je fais en mode normale F5???
Merci
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
Const SW_SHOWNORMAL = 1
Sub CATMain()
Dim partie1_gdao as string
Dim partie2_gdao as string
If Right(CurDir, 1) <> "\" Then
partie1_gdao = CurDir & "\gdao.catscript"
Else
partie1_gdao = CurDir & "gdao.catscript"
End If
ShellExecute vbNull, "open", partie1_gdao, vbNull, vbNull, SW_SHOWNORMAL
Call attente(3)
While Dir$("c:\t.txt") = vbNullString
DoEvents
Wend
eol = Chr(10)
Set doc = CATIA.ActiveDocument
Set aFileSyst = CATIA.FileSystem
call fiche_text
call creation_des_photos_pour_le_montage
confirmation = MsgBox("Voulez-vous éditer les commentaires?", vbYesNo)
Call commentaire
If Right(CurDir, 1) <> "\" Then
partie2_gdao = CurDir & "\page_montage.catscript"
Else
partie2_gdao = CurDir & "page_montage.catscript"
End If
ShellExecute vbNull, "open", partie2_gdao, vbNull, vbNull, SW_SHOWNORMAL
Call aptsource
end sub