Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Also maybe just try [A-Za-z0-9]{7,15}
Tim "Tim Williams" <saxifrax at pacbell dot net wrote in message ... EM, Any reason you're testing the range's Formula instead of the Value ? Tim "ExcelMonkey" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check for NON-presence of a string in another string | Excel Worksheet Functions | |||
VBA - Check for password protection | Excel Programming | |||
password protected a check box | Excel Worksheet Functions | |||
username & password check | Excel Programming | |||
regex string matching | Excel Programming |