E
ExcelMonkey
Can someone tell me why this is not working. I am trying to test a string to
see if it has a combination of letters and numbers from 7-15 characters long.
Thanks
Public Function CheckPassword(rng As Range) As Variant
Dim reg As Object
'Checks for password with
Set reg = CreateObject("VBScript.RegExp")
With reg
.Pattern = "^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{7,15}$"
CheckPassword = .test(rng.Formula)
End With
End Function
see if it has a combination of letters and numbers from 7-15 characters long.
Thanks
Public Function CheckPassword(rng As Range) As Variant
Dim reg As Object
'Checks for password with
Set reg = CreateObject("VBScript.RegExp")
With reg
.Pattern = "^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{7,15}$"
CheckPassword = .test(rng.Formula)
End With
End Function