Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I create a phone number mask

Status
Not open for further replies.

programmerbrian

Programmer
Sep 27, 2002
15
CA
how do I create a phone number mask in a text box to look like ( ) - filled =>(123)123-1234? Also, any suggestions of the easiest way to extract the numbers from the mask without having to use all of the string functions?

Thanks a lot!
 
Use a masked edit box - it does it all for you! Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
First add a masked edit control to your form. Use Ctrl + T to add the control to your project. Then place this code in your onload Sub...MaskEdBox1.Mask = "(###)###-####"

You could always use REPLACE to remove the unwanted characters.....just a thought. Scott
Programmer Analyst
<><
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top