passing parameter to shell

July 9, 2009 at 02:04:13
Specs: Windows XP
can anyone please help me
i have form in vb6,
2 text boxes
and a submit button

first text box is where to input the filename
second text box is where to input the

and when i click the submit button it will run a
dos exe file, but it will pass the value in text
box1, and textbox2 to the dos exe file as

heres the code

Private Sub Command1_Click()
shell "C:\Documents and
End Sub

Private Sub Form_Load()

End Sub

Private Sub Text1_Change()

End Sub

Private Sub Text2_Change()

End Sub

thanks in advance

See More: passing parameter to shell

Report •

July 9, 2009 at 06:03:59
Where's this "dos exe file" that you mention? You only have a
batch file in your code. If it's the batch file you need to run with
parameters, try this:

shell """C:\Documents and
Settings\homer.favenir.AAIGLOBAL\desktop\if.bat"" """ & Text1
& """ """ & Text2 & """"

Report •

July 9, 2009 at 18:53:27
it works fine...
and after the batch file closes, there is a decision box to ask
the user, "Is it done or pending?"

if he click done button, it will execute this
if he click pending button, it will execute this

back again to input text1.text and text2.text


Report •

Related Solutions

Ask Question