+ Reply to Thread
Results 1 to 5 of 5

Limit Userform TextBox Characters

  1. #1
    Registered User
    Join Date
    03-02-2004
    Posts
    15

    Question Limit Userform TextBox Characters

    Hi,

    I am using Excel 2000.

    I have userform which contains a text box, I would like to limit the number of characters entered into the text box.

    For example
    I would like users to only be able to enter 25 characters into txtName, when they try and enter the 26th character I don't want it to appear in the text box.

    Any ideas would be great
    Thanks
    Jennie

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Go to the properties for the textbox, set the MaxLength property to 25

    - Mangesh

  3. #3
    Registered User
    Join Date
    03-02-2004
    Posts
    15

    Smile

    Thanks for your help
    That works wonderfully

    Thanks again
    Jennie

  4. #4
    Registered User
    Join Date
    01-13-2011
    Location
    Santa Barbara, California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Limit Userform TextBox Characters

    Hi Mangesh,

    How would I do the same action in excel 2003?

  5. #5
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Limit Userform TextBox Characters

    Quote Originally Posted by cmenard View Post
    Hi Mangesh,

    How would I do the same action in excel 2003?
    It works the very same way in Excel 2003...adjust the Max Length Property for the textbox from "0"(default setting) to however many characters you want it to stop at.
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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