Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with converting CUSTOM format/TEXT format to DATE format | Excel Worksheet Functions | |||
Format Text Bar In Userform | Excel Programming | |||
format userform text box | Excel Discussion (Misc queries) | |||
Highlight certail text in a userform Text box | Excel Programming | |||
how to format excel format to text format with separator "|" in s. | New Users to Excel |