Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox number formatting
Hello all,
I'm working on a VB UI in Excel and I'm wondering if there is some VB code that I can use on exit of textbox fields to change the user-entered numbers into currency format (for example: the user enters 1000000 and tabbing out of the field the number is replaced with $1,000,000.00). I can't seem to remember any of the code to convert the numbers... Thanks in advance and have a great day, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox number formatting
Mike,
you need this Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Text = Format(TextBox1.Text, "$##,##0.00") End Sub once you click the tab the text box will be formmatted "Mike" wrote in message ... Hello all, I'm working on a VB UI in Excel and I'm wondering if there is some VB code that I can use on exit of textbox fields to change the user-entered numbers into currency format (for example: the user enters 1000000 and tabbing out of the field the number is replaced with $1,000,000.00). I can't seem to remember any of the code to convert the numbers... Thanks in advance and have a great day, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formatting a textbox | Excel Discussion (Misc queries) | |||
Textbox date formatting | Excel Discussion (Misc queries) | |||
Textbox Formatting | Excel Discussion (Misc queries) | |||
textbox formatting | Excel Discussion (Misc queries) | |||
TextBox Formatting | Excel Discussion (Misc queries) |