Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with a very simple code in Visual basic
Hi,
I'm beginning my studies with Visual Basic on my Excel 2003 and I have a problem with calculations concerning adding. I will write the source and I hope somebody could help me. The problem is that the calculation below gives me a result 34 if A=3 and B=4. However if I try to multiply these numbers the program gives me the right answer.. Sub Investments() A = InputBox("Enter domestic investment amount") B = InputBox("Enter foreign investment amount") TotalInvestment = A + B MsgBox "The total investment= " & TotalInvestment End Sub Regards Vepa |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A simple visual basic program | New Users to Excel | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
Need code for Excel Simple Visual Basic Macro to select next avai. | Excel Programming | |||
Visual Basic Code | Excel Programming |