Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default User Forms - Formating fields

I have a really easy question on a user form.

I have some fields on a form that I want to have the field reformat the
number entered into 2 decimals and to use commas (ie 1000 should re-format to
1,000.00) when the user exits the field.

What is the easiest way to do this?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default User Forms - Formating fields

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Text = Trim$(Format$(Val(TextBox1.Text), "#,##0.00"))
End Sub

HTH. Best wishes Harald

"Kathy - Lovullo" skrev i melding
...
I have a really easy question on a user form.

I have some fields on a form that I want to have the field reformat the
number entered into 2 decimals and to use commas (ie 1000 should re-format

to
1,000.00) when the user exits the field.

What is the easiest way to do this?

Thanks!



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
Forms, fields and tab order foxcole Excel Discussion (Misc queries) 1 March 18th 09 03:09 PM
Excel 2003: Forms Fields oceanmist Excel Discussion (Misc queries) 0 November 15th 06 05:01 PM
Put form fields in Word forms into an Excel spreadsheet? AMG Excel Discussion (Misc queries) 4 May 15th 06 06:18 AM
Excel Forms - text fields decompressing font automatically EM Excel Discussion (Misc queries) 0 March 11th 05 03:37 PM
User forms - blank fields Stuart Holley Excel Programming 5 April 19th 04 02:01 AM


All times are GMT +1. The time now is 01:47 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"