Dim oShell, a
oShell = CreateObject("Wscript.Shell")
a = "c:\sig.vbs"
oShell.run(a, 3, True)
I am using the code above to run a vbscript, however, I have yet to find a way to pass 2 variables to the vbscript. Can this be done at all? From a vb windows application to a vbscript?
Yes, You can pass your arguments in this way
Dim oShell, a
oShell = CreateObject("W script.Shell")
a = "c:\sig.vbs "
a=a & " " & arg1 & " " & arg2
oShell.run(a, 3, True)
Hope that will be what you want
Regards
Mohammed Al-Eqabi
Yes, You can pass your arguments in this way
Dim oShell, a
oShell = CreateObject("W script.Shell")
a = "c:\sig.vbs "
a=a & " " & arg1 & " " & arg2
oShell.run(a, 3, True)
Hope that will be what you want
Regards
Mohammed Al-Eqabi
Will this code work in VB6.
I try to use it directly with myfilename substituted for sig.vbs and get a syntax error on oShell.run(a, 3, True)
I have a number of .vbs scripts that I want to execute from button presses on a VB6 GUI.
Comment