Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Embedding a script within a script and correct syntax

Oct 12, 2007 2:07AM PDT

I have a script and want to call another script from within it (both are .vbs files)

Using VB Script, what is the correct syntax/method for this?

I don't know if this is the corrrect way to do this, or if it is possible.

What about converting the second one (the one I want to embed)to a function and make it a function call instead?

How to do this?

I've tried just using "Call "(scriptname)""

"and objShell.Run "scriptname""

however it doesn't work.


Thanks.

Discussion is locked