I would like to check with a function whether a string contains a character from a-z.
As you can see, I use the LIKE operator. The problem is that sometimes the function works, sometimes it doesn't
When I check for the following value, the function returns FALSE, instead of TRUE: 15.fdas45.fsda
Any ideas what I'm doing wrong?
Function CheckForLetter(strSearch As String) As Boolean
Dim intPosition As Long
CheckForLetter = True
For intPos = 1 To Len(strSearch)
CheckForLetter = (Mid$(strSearch, intPosition, 1) Like "[a-zA-Z]")
If Not CheckForLetter Then