Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Labels in addition

Status
Not open for further replies.

Cndn

Programmer
Nov 22, 2001
22
0
0
CA
I've asked this question before, but I still haven't found an answer. In one of my programs, I'm trying to use labels not only to display information to the user, but also to hold the information for use in the program. So my code might look like this:


label3.caption = label1.caption + label2.caption

If label1's caption is 4, and label2's caption is 5, the result I get in label 3 is 45. How can I make it so that 4 and 5 are added to equal 9 in label3's caption?
 
You might try this

label3.caption = Trim(Val(label1.caption) + Val(label2.caption)) Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top