'Appel de la procédure
ExecAndWait
Sub ExecAndWait
Dim wshShell
'l'objet WScript.Shell est aussi accessible, en VB6,
' via la référence IWshRunTimeLibrary.IWshShell (wshom.ocx)
Set wshShell = CreateObject("WScript.Shell")
'Run( bstrCommand As String
' , [pvarWindowsStyle]
' , [pvarWaitOnReturn]) As Long
wshShell.Run "cmd /c dir c: /s", 0, True
MsgBox "Fin"
Set wshShell = Nothing
End Sub
'Documentation
'WshWindowStyle
' WshHide = 0
' WshNormalFocus = 1
' WshMinimizedFocus = 2
' WshMaximizedFocus = 3
' WshNormalNoFocus = 4
' WshMinimizedNoFocus = 6