View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 24
Default Textbox appearances. Format as $ and %. How?

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....