+ Reply to Thread
Results 1 to 8 of 8

Phone number format - reference post (Formatting Textbox to type phone numbers only)

  1. #1
    Registered User
    Join Date
    12-02-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    67

    Phone number format - reference post (Formatting Textbox to type phone numbers only)

    I'm using a code provided to me but there is something I would like to fix.

    it populate the symbol (-) automatically. but if for example I type the number together 333333333 it only type 333-333-33

    Could you please help me fix the code in order to enter the number one of the other and it populate the symbol (-) automatically

    HTML Code: 
    Attached is the excel document
    Attached Files Attached Files

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    I can't duplicate that error in your file or a separate one. If I keep typing "3" I get "333-333-3333"

  3. #3
    Registered User
    Join Date
    12-02-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    what i mean is that the 4th time you press the number 3 it becomes the symbol (-). Is there a way that the symbol appears automatically after the 3rd and the 6th numbers are typed?

  4. #4
    Administrator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365 Win 11 Home 64 Bit
    Posts
    21,702

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    Set your formats on the home ribbon, number, special, phone number.
    Alan


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    12-02-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    Hi Alan,

    how do I add that format to the above code?

    Thank you

  6. #6
    Administrator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365 Win 11 Home 64 Bit
    Posts
    21,702

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    My first question is why not do it in native excel? Secondly, try using the macro recorder and then tweaking it.

  7. #7
    Registered User
    Join Date
    12-02-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    This Macro works perfect

    Please Login or Register  to view this content.

  8. #8
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Phone number format - reference post (Formatting Textbox to type phone numbers only)

    Didn't the solution(s) offered here deal with the issue?
    http://www.excelforum.com/excel-prog...bers-only.html
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formatting Textbox to type phone numbers only
    By eddyrcabrera79 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-28-2015, 12:11 AM
  2. Conditional formatting for specific phone number format
    By nwpassage in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2015, 12:30 PM
  3. Is it possible to make Excel dial a phone number from my smart phone?
    By D_Step in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-19-2013, 06:11 PM
  4. Format phone numbers
    By filip.verborgh@gallo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-18-2011, 10:23 PM
  5. format phone numbers ?
    By hotpinkstef in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2008, 11:29 AM
  6. Replies: 1
    Last Post: 02-11-2005, 01:06 PM
  7. Format A TextBox For A Phone Number
    By Minitman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2005, 06:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1