ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   textbox formatting programmatically (https://www.excelbanter.com/excel-programming/384835-textbox-formatting-programmatically.html)

malpropio

textbox formatting programmatically
 
Hi everyone
Is there a way to programmatically format a textbox to use the 1000
Separator(,).

Thx


Zack Barresse

textbox formatting programmatically
 
Hello there,

Not really sure what kind of textbox you are using, so being fairly generic,
use the Format() function, i.e. ...

Format(TextBox1.Value, "#,##0")

HTH

--
Regards,
Zack Barresse, aka firefytr
MsgBox "fire" & "fytr" & Chr(64) & "vba" & "express" & Chr(46) & "com"



"malpropio" wrote in message
oups.com...
Hi everyone
Is there a way to programmatically format a textbox to use the 1000
Separator(,).

Thx



Jim Thomlinson

textbox formatting programmatically
 
Something like this...

Private Sub TextBox1_Change()
TextBox1.Text = Format(TextBox1.Text, "#,##0")
End Sub
--
HTH...

Jim Thomlinson


"malpropio" wrote:

Hi everyone
Is there a way to programmatically format a textbox to use the 1000
Separator(,).

Thx




All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com