Re: Check if string contains a number
Quote from grays;192686
Thanks Dave but i found something i could use
If HasNumber(fgncurrency) = True Then
Err = 1
End If
then
Function HasNumber(strData As String) As Boolean
Dim iCnt As Integer
For iCnt = 1 To Len(strData)
If IsNumeric(Mid(strData, iCnt, 1)) Then
HasNumber = True
Exit Function
End If
Next iCnt
End Function
Display More
Display More
Thanks grays - this is super helpful.
However, is there a way to modify it to be true if it contains any number except 0?