Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Trine
I'm not sure what you are trying to do exactly but the code below might help you with your problem. I set up a userform with two textboxes and a button to control the code, if a whole number is added to the first textbox when you click the button it will convert the number in textbox1 to a double and also add the number as a double in the second textbox. Option Explicit Dim MyNum As Double Private Sub CommandButton1_Click() MyNum = TextBox1.Value TextBox2.Value = Format(MyNum, "0.00") TextBox1.Value = Format(MyNum, "0.00") End Sub I hope this is of some help to you Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count digits before decimals and after decimals | Excel Worksheet Functions | |||
Decimals, how? | Excel Discussion (Misc queries) | |||
Decimals? | Excel Discussion (Misc queries) | |||
Numeric formatting: decimals and no decimals | Excel Programming | |||
decimals only. | Excel Discussion (Misc queries) |