Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default format Text box in userform

hi need help with being able to format text box in userforms as $ instead of
an unformatted number. so currently for eg my text box shows 232434 i would
like it to be represented as 232,434$ in the text box....this is a trvial
question but i've tried looking up some stuff on this.

any help much appreciated....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default format Text box in userform

Amit,

Right click the textbox, view code and paste this in

Private Sub TextBox1_AfterUpdate()
TextBox1.Text = Format(TextBox1.Text, "###,###" & "$")
End Sub

The format is updated when you click out of the text box.

Mike

"amit" wrote:

hi need help with being able to format text box in userforms as $ instead of
an unformatted number. so currently for eg my text box shows 232434 i would
like it to be represented as 232,434$ in the text box....this is a trvial
question but i've tried looking up some stuff on this.

any help much appreciated....

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default format Text box in userform

hi MIke - thx for the response......only one question though...will this work
if i put this into the userform initialize sub so when the form is displayed
it has the text formatted ?

"Mike H" wrote:

Amit,

Right click the textbox, view code and paste this in

Private Sub TextBox1_AfterUpdate()
TextBox1.Text = Format(TextBox1.Text, "###,###" & "$")
End Sub

The format is updated when you click out of the text box.

Mike

"amit" wrote:

hi need help with being able to format text box in userforms as $ instead of
an unformatted number. so currently for eg my text box shows 232434 i would
like it to be represented as 232,434$ in the text box....this is a trvial
question but i've tried looking up some stuff on this.

any help much appreciated....

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default format Text box in userform

hi - htis doesnt seem to wrok when i put thsi in the userform initialize
sub.....any particular reasons?

"amit" wrote:

hi MIke - thx for the response......only one question though...will this work
if i put this into the userform initialize sub so when the form is displayed
it has the text formatted ?

"Mike H" wrote:

Amit,

Right click the textbox, view code and paste this in

Private Sub TextBox1_AfterUpdate()
TextBox1.Text = Format(TextBox1.Text, "###,###" & "$")
End Sub

The format is updated when you click out of the text box.

Mike

"amit" wrote:

hi need help with being able to format text box in userforms as $ instead of
an unformatted number. so currently for eg my text box shows 232434 i would
like it to be represented as 232,434$ in the text box....this is a trvial
question but i've tried looking up some stuff on this.

any help much appreciated....

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
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Format Text Bar In Userform Benz Excel Programming 1 September 6th 06 03:43 AM
format userform text box Zygan Excel Discussion (Misc queries) 3 July 12th 06 03:25 PM
Highlight certail text in a userform Text box sheeba Excel Programming 0 February 4th 06 10:58 AM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM


All times are GMT +1. The time now is 08:42 AM.

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"