Number Format in UserFrom Lables and Text Boxes 
Author Message
 Number Format in UserFrom Lables and Text Boxes

On a UserForm, how do I get a Lable or TextBox to show
text in a number format.  For example, I want a Lable to
show the number from cell A1 in my Excel Spreadsheet with
a comma in it ("#,##0" format).  In Visual Basic, there is
a property to set for it, but in VBA, there doesn't seem
to be one.  Any suggestions?

Thanks,
Tom



Sat, 18 Jun 2005 03:43:25 GMT  
 Number Format in UserFrom Lables and Text Boxes
I would use the Format() function:
Label1.Caption = Format(Range("A1"),"#,##0")

Kim


Quote:
> On a UserForm, how do I get a Lable or TextBox to show
> text in a number format.  For example, I want a Lable to
> show the number from cell A1 in my Excel Spreadsheet with
> a comma in it ("#,##0" format).  In Visual Basic, there is
> a property to set for it, but in VBA, there doesn't seem
> to be one.  Any suggestions?

> Thanks,
> Tom



Sat, 18 Jun 2005 11:56:20 GMT  
 Number Format in UserFrom Lables and Text Boxes
Thank you...that is exactly what I needed.

Quote:
>-----Original Message-----
>I would use the Format() function:
>Label1.Caption = Format(Range("A1"),"#,##0")

>Kim



>> On a UserForm, how do I get a Lable or TextBox to show
>> text in a number format.  For example, I want a Lable to
>> show the number from cell A1 in my Excel Spreadsheet
with
>> a comma in it ("#,##0" format).  In Visual Basic, there
is
>> a property to set for it, but in VBA, there doesn't seem
>> to be one.  Any suggestions?

>> Thanks,
>> Tom

>.



Sat, 18 Jun 2005 22:19:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Text box data bound formatted number display

2. Formatting a Text Box for phone numbers

3. formatting numbers in text boxes

4. Number format in text box

5. Text Box Number Format

6. Formatting/Rounding numbers - text box

7. help: formatting rich text box/text box

8. Modifying Text Format in use without changing text in entire text box

9. Formatting Lables

10. formatting a text box to long date format

11. from Microsoft format Number to IEE format Number

12. Formatted text from rich text box to Word

 

 
Powered by phpBB® Forum Software