View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Convert text to Long

Hi,

If the commas aren't there you can use

TextBox3.Value = Val(TextBox1.Value) + Val(TextBox2.Value)

If the commas are real use

TextBox3.Value = CLng(TextBox1.Value) + CLng(TextBox2.Value)

Mike

"Risky Dave" wrote:

Hi,

I suspect that this is really easy but I haven't been able to figure out the
solution.

I have a form that holds a couple of numbers in text boxes, eg:
TextBox1.Value is 2,000
TextBox2.Value is 12,500

What I want to do is add these two as numbers and display the answer in
TexBox3.

There will be no further manipulation of the value in TextBox3, so I don't
actually care if it stored as a number or as text, so long as it is diaplayed
as 14,500

TIA

Dave

TIA