Reputation: 651
Can we have multiple input text boxes in VBScript? I'm trying to create a form window using VBScript itself. I should get two values as input. Please help me.
Upvotes: 0
Views: 18904
Reputation: 12612
This is possible with HTA via VBScript.
Try this one http://forum.script-coding.com/viewtopic.php?pid=75356#p75356
Just add the second inputbox.
Upvotes: 1
Reputation: 16321
You have a few options that I can see.
If it makes sense to do so, use a single InputBox() but ask the user to delimit their input. Here's an example of this technique. Note the use of the default parameter to demonstrate to the user what you're looking for.
Do
s = InputBox("Enter the starting and ending years:", "Year Range", "2010-2014")
Loop While Len(s) > 0 And InStr(s, "-") = 0
If Len(s) = 0 Then
' No input or cancel clicked
Else
s = Split(s, "-")
End If
Upvotes: 2
Reputation: 614
IN a form no you cannot, but you could do this in VBS, It would list a series of input box's and the input to the frst box can be used in the title and/or description of the next text box
Firstresponse = inputbox("Enter Message", "Enter your Title")
Secondresponse = inputbox("Enter Message " & Firstresponse, "Enter your Title")
Upvotes: 0