Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,203
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,203
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



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
Highlight all Text in a Textbox when the textbox is selected RPIJG[_73_] Excel Programming 3 October 28th 05 08:28 PM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"