Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InputBox Question

Status
Not open for further replies.

Netman06

Technical User
Aug 15, 2006
70
US
Hello,

I have two input boxes, with both yes and cancel.

I would like to have the script quit, if the user does not enter any text into the input box or press cancel. Can I do this here is my code so far.

result1 = InputBox(Message1,Title)
result2 = InputBox(Message2,Title)

If result1 = 2 Then
WScript.Quit
Else
WScript.Echo Text2 & result1
'other commands here
End If

does inputbox, responsed like msgbox with 2 being cancel button was pressed.


Thanks,

Mike
 
Awesome! I now just need to recode this so that it works like the MSDN article pointed out.
Thanks,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top