potresti fare così

codice:
Private Const PROCESS_QUERY_INFORMATION = &H400
Private Const STATUS_PENDING = &H103&

Private Declare Function OpenProcess Lib "kernel32" _
    (ByVal dwDesiredAccess As Long, _
    ByVal bInheritHandle As Long, _
    ByVal dwProcessId As Long) As Long

Private Declare Function GetExitCodeProcess Lib "kernel32" _
    (ByVal hProcess As Long, lpExitCode As Long) As Long

Private Declare Function CloseHandle Lib "kernel32" _
   (ByVal hObject As Long) As Long

Sub ShellAndWait(sFile As String, Visualizzazione As Long)
Dim hProcess As Long
Dim ProcessId As Long
Dim CodExit As Long

    ProcessId = Shell(sFile, Visualizzazione)
    hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, ProcessId)
    Do
        Call GetExitCodeProcess(hProcess, CodExit)
        DoEvents
    Loop While CodExit = STATUS_PENDING

    Call CloseHandle(hProcess)
End Sub
per usarla
codice:
Call ShellAndWait("command.com /c xcopy c:\autoexec.bat d:\", vbHide)