Thread: Textbox Format
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gti_jobert gti_jobert is offline
external usenet poster
 
Posts: 1
Default Textbox Format


Hi all,

I have a textbox on my userform and neeeeed it formatted. When the user
enters it I want them to enter a 10 digit number only but also have it
display a '-' in the middle of the number.

for example,

#####-##### (the textbox should always display the '-' in the middle of
the textbox. Is this possible? I have previously tried:


Code:
--------------------
txtPartno.Text = Format(txtPartno.Text, "#####-#####")
--------------------


but have had no joy, any help would be much appreciated.

Taa in advance!


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=502886