![]() |
Textbox Help
Hi all, I have a textbox where I want the user to enter a 6 digit number.....how can I format the text box so it always displays '100xxxxxx' where x = the 6 digit user input. TIA guys! -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=541029 |
Textbox Help
Use Format | Cell and use the Custom tab, enter 100###### as a new custom
format to be applied. "gti_jobert" wrote: Hi all, I have a textbox where I want the user to enter a 6 digit number.....how can I format the text box so it always displays '100xxxxxx' where x = the 6 digit user input. TIA guys! -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=541029 |
Textbox Help
Private Sub TextBox1_Change()
Static fReEntry As Boolean If Not fReEntry Then fReEntry = True With Me.TextBox1 If Len(.Text) 1 Then .Text = Right(.Text, Len(.Text) - 3) End If .Text = Format(.Text, """100""0") End With fReEntry = False End If End Sub -- HTH Bob Phillips (remove xxx from email address if mailing direct) "gti_jobert" wrote in message ... Hi all, I have a textbox where I want the user to enter a 6 digit number.....how can I format the text box so it always displays '100xxxxxx' where x = the 6 digit user input. TIA guys! -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=541029 |
Textbox Help
Oops, my bad - it is the textbox you want to display the format that way in,
not a cell which echos the input. I don't believe you can do that type of custom formatting with the text box. "gti_jobert" wrote: Hi all, I have a textbox where I want the user to enter a 6 digit number.....how can I format the text box so it always displays '100xxxxxx' where x = the 6 digit user input. TIA guys! -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=541029 |
Textbox Help
Thanks again bob, always appreciate your input -- gti_jober ----------------------------------------------------------------------- gti_jobert's Profile: http://www.excelforum.com/member.php...fo&userid=3063 View this thread: http://www.excelforum.com/showthread.php?threadid=54102 |
All times are GMT +1. The time now is 06:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com