+ Reply to Thread
Results 1 to 4 of 4

excel userform textbox validation

  1. #1
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    excel userform textbox validation

    Hi all,

    Need your help with textbox validation.

    I need the validation for the following:

    Textbox will accept this ###### - 6 digit numbers and ######-## = 6 digit number followed by "-" and another 2 digit number.

    Is this possible?

    Thanks!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: excel userform textbox validation

    Hi,

    You could use the Like operator to achieve that
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    Re: excel userform textbox validation

    Thanks! working perfectly.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: excel userform textbox validation

    Different situations might need different approaches so an alternative that is proactive rather than reactive...

    Please Login or Register  to view this content.
    It also adds the separating '-' automatically.

+ 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] UserForm TextBox Validation for Whole Numbers
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-14-2022, 08:08 PM
  2. Validation of Textbox on Userform
    By bigfishprf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2015, 01:52 AM
  3. [SOLVED] How to use validation in right way in TextBox in side UserForm?
    By Reemet in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-18-2014, 06:51 AM
  4. Data Validation in textbox on userform
    By nav505 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2013, 08:02 PM
  5. Data Validation in textbox on userform
    By nav505 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2013, 07:37 PM
  6. UserForm TextBox validation and focus
    By Indiana Epilepsy and Child Neurology in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-14-2011, 03:10 AM
  7. Data validation in TextBox on UserForm
    By tim_chisman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2010, 09:33 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