When I call a rebol script with
call shell("rebol.exe myscript.r")
The shell doesn't return until the script is finished. Is there a way to force VBA Shell to be asynchronous ?
When I call a rebol script with
call shell("rebol.exe myscript.r")
The shell doesn't return until the script is finished. Is there a way to force VBA Shell to be asynchronous ?
You'll want to pass in a second argument to make the program run in the background. Here's the documentation.
call shell("rebol.exe myscript.r", vbMinimizedNoFocus)
If you just want to use Shell
function, try another option with using API :
Private 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
This is the full code of ShellEx
function :