469,090 Members | 1,222 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

Passing a value

Hopefully, this will not be as bad as passing a kidney stone. :-)

Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?

David
Jul 17 '05 #1
4 5051
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
Hopefully, this will not be as bad as passing a kidney stone. :-)

Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?


if you pass the argument on the command line the WScript.Arguments
collection can be used in the script to get the info
Jul 17 '05 #2
bu*******@earthlink.net (Bob Butler) wrote in message news:<fa************************@posting.google.co m>...
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
Hopefully, this will not be as bad as passing a kidney stone. :-)

Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?


if you pass the argument on the command line the WScript.Arguments
collection can be used in the script to get the info


How do I declare that in my script file? I am just using Notepad.
Jul 17 '05 #3
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
bu*******@earthlink.net (Bob Butler) wrote in message news:<fa************************@posting.google.co m>...
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
Hopefully, this will not be as bad as passing a kidney stone. :-)

Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?


if you pass the argument on the command line the WScript.Arguments
collection can be used in the script to get the info


How do I declare that in my script file? I am just using Notepad.


dim oArgs, sArgs
Set oArgs = WScript.Arguments
For x = 0 To oArgs.Count - 1
sArgs = sArgs & " " & oArgs(x)
Next
Set oArgs = Nothing
msgbox sArgs
Jul 17 '05 #4
bu*******@earthlink.net (Bob Butler) wrote in message news:<fa************************@posting.google.co m>...
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
bu*******@earthlink.net (Bob Butler) wrote in message news:<fa************************@posting.google.co m>...
dh*******@chestnut.org (David) wrote in message news:<83**************************@posting.google. com>...
> Hopefully, this will not be as bad as passing a kidney stone. :-)
>
> Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?

if you pass the argument on the command line the WScript.Arguments
collection can be used in the script to get the info


How do I declare that in my script file? I am just using Notepad.


dim oArgs, sArgs
Set oArgs = WScript.Arguments
For x = 0 To oArgs.Count - 1
sArgs = sArgs & " " & oArgs(x)
Next
Set oArgs = Nothing
msgbox sArgs

Thanks, that did the trick!

David
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Dave | last post: by
7 posts views Thread by Harolds | last post: by
9 posts views Thread by Just Me | last post: by
6 posts views Thread by MSDNAndi | last post: by
17 posts views Thread by Christopher Benson-Manica | last post: by
12 posts views Thread by Andrew Bullock | last post: by
12 posts views Thread by Mike | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.