シェル実行

Public Function testUwscA()
    Dim ShellObject As Object
    Set ShellObject = CreateObject("WScript.Shell")
    Dim a$
    a$ = CurrentProject.path & "\uwsc\test.bat"
    
    ShellObject.Run a, 1, 1
    Debug.Print "end"
End Function

Public Function testUwscB()
    Dim a$
    a = CurrentProject.path & "\uwsc\uwsc.exe " & CurrentProject.path & "\uwsc\test.uwsc"
    
    Dim appid
    appid = Shell(a, vbNormalFocus)

    
    For i = 1 To 10000
        DoEvents
        If Not isRunning(appid) Then
            Exit Sub
        End If
    Next
    
End Function
/* -----codeの行番号----- */