How Can We Help?
< All Topics

Pass Variables between Macro Express and VB External Script

Is it possible to pass variables back and forth between Macro Express commands and VB external script coding all in the same macro?

To pass Macro Express Pro variables to your VB Script do this:

In your macro use the Variable Set String command

Variable Set String %MacExpString% to “Pass this to VBScript”

Then include this line in the External Script command:

vbsString = “%MacExpString%”

Use one of these methods to pass variables from VBScript to your Macro Express Pro macro:

  1. Have your VBScript write values to the registry and use Macro Express to read the values from the registry
  2. Have your VBScript write values to a file and use Macro Express to read values from the file
  3. Have your VBScript write values to the ‘console’ variable and have Macro Express parse the values from the console variable.

– Applies to: Macro Express Pro