Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox Formatting

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox Formatting


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox Formatting

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox Formatting

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default TextBox Formatting

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default TextBox Formatting

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
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
formatting a textbox Ed Excel Discussion (Misc queries) 1 February 24th 08 09:15 PM
Textbox Formatting jmc8355 Excel Discussion (Misc queries) 3 April 24th 07 06:30 PM
textbox formatting jnf40 Excel Discussion (Misc queries) 1 August 3rd 06 08:12 PM
Textbox formatting James Auty Excel Programming 1 February 4th 04 06:34 PM
Textbox formatting Todd Huttenstine[_3_] Excel Programming 5 January 25th 04 12:25 AM


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

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

About Us

"It's about Microsoft Excel"