Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a few text boxes on a userform that display values for allowances,
however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With Userform1
.Textbox1.Text = Range("A1").Text End With -- Regards, Tom Ogilvy "Corey" wrote in message ... I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks Tom.
Perfect. Easy when you know how. Corey.... "Tom Ogilvy" wrote in message ... With Userform1 .Textbox1.Text = Range("A1").Text End With -- Regards, Tom Ogilvy "Corey" wrote in message ... I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Corey,
You can use the on_exit event of the textbox as below Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Text = Format(TextBox1.Text, "#,##0.00") End Sub Changing the format to your desired format. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Corey" wrote: I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What about this one i'm now stuckon?
Private Sub TextBox1_Change() ActiveSheet.Select With Me.TextBox1 End With End Sub Want it to display $xx.xx Only displays x Corey.... "Martin Fishlock" wrote in message ... Corey, You can use the on_exit event of the textbox as below Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Text = Format(TextBox1.Text, "#,##0.00") End Sub Changing the format to your desired format. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Corey" wrote: I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change fires on every entry made in a textbox - if the user is typing in an
answer, trying to format in the change event would be difficult. Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) With Me.TextBox1 .Text = Format(.Text,"$ #0.00") End With End Sub -- Regards, Tom Ogilvy "Corey" wrote in message ... What about this one i'm now stuckon? Private Sub TextBox1_Change() ActiveSheet.Select With Me.TextBox1 End With End Sub Want it to display $xx.xx Only displays x Corey.... "Martin Fishlock" wrote in message ... Corey, You can use the on_exit event of the textbox as below Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Text = Format(TextBox1.Text, "#,##0.00") End Sub Changing the format to your desired format. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Corey" wrote: I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Do i remove the change code, and then insert the exit code. I ge tthe same result. Just the amount, and no $xx.xx Corey.... "Tom Ogilvy" wrote in message ... Change fires on every entry made in a textbox - if the user is typing in an answer, trying to format in the change event would be difficult. Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) With Me.TextBox1 .Text = Format(.Text,"$ #0.00") End With End Sub -- Regards, Tom Ogilvy "Corey" wrote in message ... What about this one i'm now stuckon? Private Sub TextBox1_Change() ActiveSheet.Select With Me.TextBox1 End With End Sub Want it to display $xx.xx Only displays x Corey.... "Martin Fishlock" wrote in message ... Corey, You can use the on_exit event of the textbox as below Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.Text = Format(TextBox1.Text, "#,##0.00") End Sub Changing the format to your desired format. -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Corey" wrote: I have a few text boxes on a userform that display values for allowances, however $10.00 displays as 10 with no "$" and no 2 decimal values. Also a 0.09 is displayed in another textbox, however i want it displayed as "9%". How do i change the format apperances of these? Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet - various appearances | Excel Discussion (Misc queries) | |||
excel number appearances | Excel Worksheet Functions | |||
Multiple name appearances | Excel Worksheet Functions | |||
counting appearances of a short string within strings in a whole worksheet | Excel Discussion (Misc queries) | |||
Textbox Format | Excel Programming |