Hi,
You need to use regular expression for that.Try the below one.
Regards,
Ankesh
You need to use regular expression for that.Try the below one.
Code:
Set RegEx = CreateObject("VBScript.RegExp") 'Create Object
RegEx.Pattern = "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[[@#$^&*_-]).{6,12}" 'Set the pattern
strResult=RegEx.Test(strText) 'Test string,Replace strText with ur pwd
If strResult=False Then
msgbox "Invalid Password"
Else
msgbox "Valid Password"
End If
Set RegEx =Nothing
Regards,
Ankesh