Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default VB number formats

you could try this, as long as there is a command button or somewhere to go
after the last textbox entry

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.TextBox1 = Format(Me.TextBox1.Value, "$#,###,###.00")
End Sub


--


Gary


"timmulla" wrote in message
...
Can somebody please help me with some VB number formats?

I have a textbox on a form that users manually input a percent. Is there a
way to set the number format to a percent through VB code? Currently, the
user needs to manually add the percent sign to the number they are inputing.
I would like the percent sign to automatically default to the numbers inputed
to the textbox.

I'm also trying to set a number format in another textbox as a currency
(i.e. $###,###.##). I would like the inputed dollar amount in this text box
to automatically default to a currency format of $###,###.##.

Not sure if this can be done through the properties window or not.

any information would be appreciated.

--
Regards,

timmulla



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
Number Formats Brent Excel Discussion (Misc queries) 6 April 2nd 09 12:48 AM
Number formats Pat Excel Discussion (Misc queries) 5 October 1st 07 04:15 AM
Number Formats Matt Excel Discussion (Misc queries) 4 May 17th 07 06:35 PM
number formats blackbox Excel Worksheet Functions 8 April 10th 06 06:13 AM
number formats Greg[_12_] Excel Programming 1 September 19th 03 11:20 PM


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