Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Forms - Formating fields
I have a really easy question on a user form.
I have some fields on a form that I want to have the field reformat the number entered into 2 decimals and to use commas (ie 1000 should re-format to 1,000.00) when the user exits the field. What is the easiest way to do this? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Forms - Formating fields
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Text = Trim$(Format$(Val(TextBox1.Text), "#,##0.00")) End Sub HTH. Best wishes Harald "Kathy - Lovullo" skrev i melding ... I have a really easy question on a user form. I have some fields on a form that I want to have the field reformat the number entered into 2 decimals and to use commas (ie 1000 should re-format to 1,000.00) when the user exits the field. What is the easiest way to do this? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Forms, fields and tab order | Excel Discussion (Misc queries) | |||
Excel 2003: Forms Fields | Excel Discussion (Misc queries) | |||
Put form fields in Word forms into an Excel spreadsheet? | Excel Discussion (Misc queries) | |||
Excel Forms - text fields decompressing font automatically | Excel Discussion (Misc queries) | |||
User forms - blank fields | Excel Programming |