Need Help Plz LOOK!

jaygayPayCash

Banned
Mar 6, 2001
222
0
0
i have a project i have to do ,i am just about finished i just need to know how do you add in Visual Basics.?

i can subtract times and everything just not + please help
 

jaygayPayCash

Banned
Mar 6, 2001
222
0
0
hhumm ,i did didnt work this is what will happen

say i have

Text5.Text = Text1.Text + Text4.text





this is what happens text 1 is 40000 and text 4 is 3600

is text 5 i get 400003600
 

dopcombo

Golden Member
Nov 14, 2000
1,394
0
0
erm i dunno about visual but basic computer programming tells me that you can't "add" text variables.

maybe u shd reassign them as integers or double instead?
 

Jarwa

Golden Member
Jan 7, 2001
1,160
0
0
Use the Val statement for Text1.text and Text4.text.

For Example: Exam1 = Val(Text1.text)
Exam2 = Val(Text4.text)

[Edit] Had to correct my syntax errors!
 

Jarwa

Golden Member
Jan 7, 2001
1,160
0
0
The Val statement allows text box objects to be used as numbers.

Did this help any? Or am I way off base here?
 

Jarwa

Golden Member
Jan 7, 2001
1,160
0
0
Sorry, no I don't have icq.
Are you hard coding the 40000 and the 3600?
Or, are you getting those numbers from the user?
The Val statement allows you to get a number from the user from the textbox.

I can e-mail you the code for a program that I wrote that uses the Val statement. Would that help?

What are you trying to do with the program besides add two numbers?
 

jaygayPayCash

Banned
Mar 6, 2001
222
0
0
ok this is what i have

Text5.Text = Val(Text1.Text) + Val(Text6.Text)

now when i click on the button , it brings up the first number then when i hit it again , it adds them together.. hhumm , why dont it do it , in one click
 

Jarwa

Golden Member
Jan 7, 2001
1,160
0
0
Maybe try someting like:

declare variables
XXXXX = Val(Text1.text)
XXXXX = Val(Text6.text)

calculate
Addition = XXXXX + XXXXX

output the addition to a label
Label5.Caption = Addition

Hell, maybe that will help. Let me know.