Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Highlight all Text in a Textbox when the textbox is selected | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |