Answer the question
In order to leave comments, you need to log in
How to cast type "string" to number in VBS?
Hello! I understand VBS. I'm looking into the user interaction functions MsgBox() and InputBox(). I wrote a simple script that should calculate the sum of the numbers entered by the user:
Option Explicit
Dim a,b,Result
a = InputBox("Введите первое число","Сумма чисел")
b = InputBox("Введите второе число","Сумма чисел")
Result = a+b
MsgBox Result
Answer the question
In order to leave comments, you need to log in
although the "+" operator should convert strings to numbers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question