Character restraints in Visual Basic

Posted on 2009-04-22
Last Modified: 2013-11-27
I am trying to create a form that only accepts passwords that are between a certain length.  The textbox allows you to put in a max length in the properties.  How do you put in the minimum length acceptable?
Question by:Emily78
    1 Comment
    LVL 85

    Accepted Solution

    Usually you have an "OK" button right?  Set the Enabled() Property of the Button to False.  Then in the TextChanged() Event of the TextBox, change the Enabled() Property of the Button accordingly...

    You could also change the BackColor of the TextBox from Red to Green when the password has met the minimum Length.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Problem to line 4 58
    Fix insertion and shifting issue 5 53
    Example of WebAPI 7 26
    T-SQL Debugging - Temp Object Content 2 43
    This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (, we saw how to put the Delete button back there where it belongs.  "Delete" is …
    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now