ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Number stored as text (https://www.excelbanter.com/excel-programming/376842-number-stored-text.html)

Justin[_14_]

Number stored as text
 
Hello,

I am entering Numeric data into a TextBox, and sometimes I have to
enter the data in European formatting (instead of a period (.) they use
a comma (,) as the decimal placeholder).

So when I change my Windows Region to (example) German, and I enter
10,02, it enters the spreadsheet as Text.

How do I get it to enter the speadsheet as a Number? The Windows
Region allows the spreadsheet to recognize the data as a number in
10,02 , it just doesn't do that automatically...

Suggestions!?


Jim Cone

Number stored as text
 
See what happens if you convert the textbox value to a Double
before placing it on the sheet...
Range("A1").Value = CDbl( ? .Textbox1.Value)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Justin"
wrote in message
Hello,
I am entering Numeric data into a TextBox, and sometimes I have to
enter the data in European formatting (instead of a period (.) they use
a comma (,) as the decimal placeholder).

So when I change my Windows Region to (example) German, and I enter
10,02, it enters the spreadsheet as Text.

How do I get it to enter the speadsheet as a Number? The Windows
Region allows the spreadsheet to recognize the data as a number in
10,02 , it just doesn't do that automatically...
Suggestions!?



All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com