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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAlculations?

Status
Not open for further replies.

mrathi

Technical User
Oct 27, 2003
115
US
Hi, I have various labels that get the values from calculations. I display them using the String.Format to look like currency. Now if I want to do calculations on these and display on another label, is it possible?

For example, label 1 shows $100.00, label 2 shows $50.5, label 3 shows $ 0.0, and I want my label to show the sum from all three labels! ($150.5)

Thanks for your replies. All you people are wonderful.
 
Add them together, then use the "C" format character in your call to ToString.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
I tried that, I do label4.text = label1.text + label2.text + label3.text, however, it treats them as strings and outputs $100.00$50.5$0.0

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top