tags:

views:

99

answers:

2

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 ?

A: 

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)
Conspicuous Compiler
Well I just tried it didn't work. And when I read doc it's about setting focus not really about being asynchronous.
Rebol Tutorial
+1  A: 

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 :

http://www.vbaccelerator.com/codelib/shell/shellex.htm

Zai
Thanks will try.
Rebol Tutorial