Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Textbox appearances. Format as $ and %. How?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Textbox appearances. Format as $ and %. How?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Textbox appearances. Format as $ and %. How?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Textbox appearances. Format as $ and %. How?

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   Report Post  
Posted to microsoft.public.excel.programming
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....







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Textbox appearances. Format as $ and %. How?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Textbox appearances. Format as $ and %. How?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet - various appearances mkflirting Excel Discussion (Misc queries) 1 April 14th 10 01:07 PM
excel number appearances longgone Excel Worksheet Functions 1 March 10th 10 07:31 PM
Multiple name appearances Pat318 Excel Worksheet Functions 1 February 17th 10 04:29 PM
counting appearances of a short string within strings in a whole worksheet ricowyder Excel Discussion (Misc queries) 3 December 7th 06 11:52 AM
Textbox Format Greg[_27_] Excel Programming 1 June 19th 06 06:26 PM


All times are GMT +1. The time now is 06:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"