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

Formating Textbox Problem 1

Status
Not open for further replies.

max1565

Technical User
Dec 16, 2002
57
US
I have a column of money amounts that sre summed. The new amounts are entered from a textbox to a new sheet. The new items are then copied to the column that is being summed. The items that came from the textbox will not add. If i type the same number over the textbox it adds. This is driving me nuts!!!

Does anyone have any ideas. Sorry about the explanation, but it is kind of hard to explain. I tried formating the textbox results, but it did no good.

Thanks
 
The textbox is used by the user to add new data to an existing database excel spreadsheet. One of the columns consists of the sale price of different houses. Monthly reports are generated from the database. One item that goes in the report is the sum of all sale prices. This is where the problem is. The dollar amounts will not add up. It has something to do with what the text box is placing in the column, because I can type in the same number to replace what the textbox put in and it adds up just fine.

Hope that explained it better.

Thanks
 
I am assuming that you are using Range("A1") = TextBox1, try using Range("A1") = Val(TextBox1). That might do the trick. Without being able to see which code you are using, it is a bit difficult to give a better answer.

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
I was using Range("A1") = TextBox1. I cahnged it to Range("A1") = Val(TextBox1)and it worked. Does that mean that before, excel was thinking that it was text?

Thanks Bowers74 :-D
 
I believe that the standard return value for a TexBox is text. Some people use Textbox1.Value, but I have found that you can't co wrong with Val(TextBox1) if you are using numbers!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top