Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function IsValid(ByRef strPassword As String, intCount As Integer, intPosition As Integer) As Boolean
  2.         If strPassword = String.Empty Then
  3.             MessageBox.Show("Please enter a password")
  4.         ElseIf strPassword.Length < 6 Then
  5.  
  6.             Do While intCount <= 10
  7.                 intPosition = strPassword.IndexOf(intCount)
  8.                 MessageBox.Show("Please enter 6 characters and a numeric digit")
  9.                 MessageBox.Show(intPosition)
  10.  
  11.  
  12.             Loop
  13.         ElseIf strPassword.Length >= 6 Then
  14.             MessageBox.Show("Your password is good")
  15.             Return True
  16.         ElseIf strPassword.Length = -1 Then
  17.             MessageBox.Show("Your password is invalid")
  18.             Return False
  19.         End If
  20.         Return strPassword
  21.     End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement