passing parameter to shell

July 9, 2009 at 02:04:13
Specs: Windows XP
hi,
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
secondfilename

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
parameter

heres the code

Private Sub Command1_Click()
shell "C:\Documents and
Settings\homer.favenir.AAIGLOBAL\desktop\if.
bat"
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 •


#1
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 •

#2
July 9, 2009 at 18:53:27
thanks,
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

TIA


Report •

Related Solutions


Ask Question