E
Ed
I've been looking at newsgroup posts and VBScript sites all morning,
and can't seem to find a simple explanation and method for calling a
script from a Word or Excel macro and passing a variable into the
script, then returning the result of whatever the script does into the
macro.
That can mean there isn't any simple way to do this, and I need to stop
looking. In the hopes, however, that I am too unlearned to recognize
the answer when I see it, I'd like to just ask: how do I do this? For
instance:
~~VBA macro~~
Sub Foo2Script
Dim x As Long
x=2
Call script here
MsgBox scriptresult
End Sub
~~VBScript~~
Dim x, y
x = x_from_macro
y = x + 2
scriptresult = y
Any help is greatly appreciated.
Ed
and can't seem to find a simple explanation and method for calling a
script from a Word or Excel macro and passing a variable into the
script, then returning the result of whatever the script does into the
macro.
That can mean there isn't any simple way to do this, and I need to stop
looking. In the hopes, however, that I am too unlearned to recognize
the answer when I see it, I'd like to just ask: how do I do this? For
instance:
~~VBA macro~~
Sub Foo2Script
Dim x As Long
x=2
Call script here
MsgBox scriptresult
End Sub
~~VBScript~~
Dim x, y
x = x_from_macro
y = x + 2
scriptresult = y
Any help is greatly appreciated.
Ed