Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Beginner Variable Problem
First Day Learning VBA for Excel. I've written the following su
routine, Option Explicit Sub SunnyDay() Dim Input1 Dim Input2 Dim Total Input1 = InputBox("Enter the first amount!") Input2 = InputBox("Enter the second amount!") Total = Input1 + Input2 MsgBox "The total amount is " & Total End Sub Why does the Total Amount of 2+2 display as 22? If I change th operators to * , / , or - , I get the correct arithmetic answer. Wit the + I get concatenation instead of addition. Curious. Cheers Dodu -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with a defined variable | Excel Programming | |||
Object variable problem | Excel Programming | |||
vba variable problem | Excel Programming | |||
Mixed variable problem | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |