Sunday 12 March 2017

Inputbox in VB Script


Inputbox in VB Script is used for getting value from user.
In Inputbox, we can take numerical or alphabet values.
                var1=inputbox ("Enter your text")
                msgbox var1
Save this program as .vbs


After given input text

                 var1=cint(inputbox("Enter the first value for sum"))
                 var2=cint( inputbox ("Enter the second value for sum"))
                 msgbox "Sum of two input value is = " &sum

Save this program as .vbs format
*Here "cint" is used for read value as numerical value, if you will not use cint or other data type then it will read the input values as string and give the result of these input as merge the two values.

No comments:

Post a Comment