Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am formatting the value of a textbox with the code:
TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Private Sub TextBox1_AfterUpdate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub Private Sub UserForm_Activate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... I am formatting the value of a textbox with the code: TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your reply Bob
UserForm_Activate still isn't working. The next time the userform is displayed it goes back to its standard format. Also, there are quite a few textboxes in this userform in various frames in a multipage. Is there a better way to apply this format to all of them? -----Original Message----- Private Sub TextBox1_AfterUpdate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub Private Sub UserForm_Activate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... I am formatting the value of a textbox with the code: TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you unload the form, all objects will re-initialise the next time you
show the form. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... Thanks for your reply Bob UserForm_Activate still isn't working. The next time the userform is displayed it goes back to its standard format. Also, there are quite a few textboxes in this userform in various frames in a multipage. Is there a better way to apply this format to all of them? -----Original Message----- Private Sub TextBox1_AfterUpdate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub Private Sub UserForm_Activate() TextBox113.Text = Format(TextBox113.Text, "#,##0.00") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... I am formatting the value of a textbox with the code: TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked, but only for one textbox. all the others stay
the same. anything i should do differently for multiple textboxes? Thanks a lot for your help. -----Original Message----- If you unload the form, all objects will re-initialise the next time you show the form. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... Thanks for your reply Bob UserForm_Activate still isn't working. The next time the userform is displayed it goes back to its standard format. Also, there are quite a few textboxes in this userform in various frames in a multipage. Is there a better way to apply this format to all of them? -----Original Message----- Private Sub TextBox1_AfterUpdate() TextBox113.Text = Format (TextBox113.Text, "#,##0.00") End Sub Private Sub UserForm_Activate() TextBox113.Text = Format (TextBox113.Text, "#,##0.00") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... I am formatting the value of a textbox with the code: TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA . . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Only add each one separately in the activate event and have separate
AfterUpdate events for each. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... That worked, but only for one textbox. all the others stay the same. anything i should do differently for multiple textboxes? Thanks a lot for your help. -----Original Message----- If you unload the form, all objects will re-initialise the next time you show the form. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... Thanks for your reply Bob UserForm_Activate still isn't working. The next time the userform is displayed it goes back to its standard format. Also, there are quite a few textboxes in this userform in various frames in a multipage. Is there a better way to apply this format to all of them? -----Original Message----- Private Sub TextBox1_AfterUpdate() TextBox113.Text = Format (TextBox113.Text, "#,##0.00") End Sub Private Sub UserForm_Activate() TextBox113.Text = Format (TextBox113.Text, "#,##0.00") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ToddG" wrote in message ... I am formatting the value of a textbox with the code: TextBox113.Text = Format(TextBox113.Text, "#,##0.00") This textbox is used to enter a price. I would like this textbox to keep this format at all times - after a value is entered AND when the userform is activated. Where would I place this code and what declaration would be used? TIA . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formatting a textbox | Excel Discussion (Misc queries) | |||
Textbox Formatting | Excel Discussion (Misc queries) | |||
textbox formatting | Excel Discussion (Misc queries) | |||
Textbox formatting | Excel Programming | |||
Textbox formatting | Excel Programming |