Results 1 to 6 of 6

Thread: [RESOLVED] Password Verification

  1. #1

    Thread Starter
    New Member Tito Fadda's Avatar
    Join Date
    May 2011
    Location
    Egypt
    Posts
    2

    Resolved [RESOLVED] Password Verification

    I dont know if my problem is similar to this or no but here it is :
    Im making a simple program in which the user have an option to change password but the new password must be at least of 5 characters and must have at least one number. I could do the first part but for number filter, I almost tried all ways I know. So, I appreciate any help in this.
    Ty in advance =)

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: [GAVE UP] Have an event fire as soon as a part number is scanned in a textbox

    Your problem doesn't even remotely relate to the original thread post.
    Also do you know that you are posting to a 2 year old thread?
    You might get a better response if you start your own new thread.

    Regarding your problem, similar questions have been asked numerous times on this forum and searching for similar threads might reveal you useful post. If that doesn't help, let us know and we will be glad to post new solutions to your problem.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Password Verification

    Split into its own thread

    Even if your problem was exactly the same as the 2 year old thread your posted your question in, you should always start a new thread.

  4. #4
    Junior Member macmatira's Avatar
    Join Date
    Mar 2010
    Posts
    21

    Re: Password Verification

    Quote Originally Posted by Tito Fadda View Post
    I dont know if my problem is similar to this or no but here it is :
    Im making a simple program in which the user have an option to change password but the new password must be at least of 5 characters and must have at least one number. I could do the first part but for number filter, I almost tried all ways I know. So, I appreciate any help in this.
    Ty in advance =)
    use the code
    Code:
    Isnumeric (string)
    i hope this code help you.
    it filters.

    but i'm not sure.
    just try and explore.
    ty.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Password Verification

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim lngIndex As Long
    3. Dim bFound As Boolean
    4.  
    5. If Len(txtPassword.Text) < 5 Then
    6.     MsgBox "Password is too short"
    7.     Exit Sub
    8. End If
    9.  
    10. For lngIndex = 1 To Len(txtPassword.Text)
    11.     If IsNumeric(Mid(txtPassword.Text, lngIndex, 1)) Then
    12.         bFound = True
    13.         Exit For
    14.     End If
    15. Next
    16.  
    17. If Not bFound Then
    18.     MsgBox "Password must contain at least one numeric character"
    19.     Exit Sub
    20. End If
    21.  
    22. End Sub

  6. #6

    Thread Starter
    New Member Tito Fadda's Avatar
    Join Date
    May 2011
    Location
    Egypt
    Posts
    2

    Re: [RESOLVED] Password Verification

    Ty so much Marting, thats exactly what I want ... and sorry guys, I didnt notice date for old forums, I was too angry to look at 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