Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform to prompt users to enter certain data before being allowed
access to a sheet for further data entry. On this form I have a textbox for a software version in the format x.xx The data in this textbox is then entered in a cell on the sheet using the line below. If UserForm1.ComboBox1.Value < "Other" Then Worksheets("Ziehm").Range("L2") = CSng(TextBox1.Value) 'Software version This works well except that the value transferred is not exactly the same as that entered eg I entered 4.16 in the textbox and, although 4.16 is shown in the sheet, this is only due to cell formatting. The actual value transferred is 4.1599998474121. Can anyone a) explain why, and b) suggest alternative/additional code such that what is in the text box is transferred exactly? I'm more concerned with the solution than the explanation, but it would be interesting to know why. Due to other code this value MUST be a number. TIA -- Ian -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
Transparency Discrepency | Excel Programming | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |