Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function IsValid(ByRef strPassword As String, intCount As Integer, intPosition As Integer) As Boolean
- If strPassword = String.Empty Then
- MessageBox.Show("Please enter a password")
- ElseIf strPassword.Length < 6 Then
- Do While intCount <= 10
- intPosition = strPassword.IndexOf(intCount)
- MessageBox.Show("Please enter 6 characters and a numeric digit")
- MessageBox.Show(intPosition)
- Loop
- ElseIf strPassword.Length >= 6 Then
- MessageBox.Show("Your password is good")
- Return True
- ElseIf strPassword.Length = -1 Then
- MessageBox.Show("Your password is invalid")
- Return False
- End If
- Return strPassword
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement