Results 1 to 2 of 2

Thread: Mask Format for Date and Phone Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Greenville
    Posts
    73

    Post

    Hello I am trying to find a good way to put a mask on a textbox for dates and phone numbers so when it gets focus it will get the mm/dd/yyyy or (###)###-#### mask. I don't want to use a mask edit. Does anyone have a piece of code that can show me that? I have been trying to use
    text1.text = format ( text1.text, "(###)###-####") but it is not working. Please Help! Pre-Thanks

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    This mask for phone should work just fine: Text1.Text = Format(Text1.Text, "(###)###-####") as long as you have correct number of digits. Same goes for a Date.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width