Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,438 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The statement Result = number1 + number2 returns the joining of the numbers and not the sun.
Convert the values to integer
Result = CInt(number1) + CInt(number2)
In VBScript, the + operator can be used for both addition and concatenation.
If number1 and number2 are variables containing numeric values,
then the statement Result = number1 + number2 will correctly return the sum of the two numbers.