My code is as follows:
sub main()
'''some more code'''
For j = InStr(1, stext, " ") To Len(stext)
If IsNumeric(Mid(stext, j, 1)) Or IsAlpha(Mid(stext, j, 1)) Then
letter1 = Mid(stext, j, Len(stext))
Exit For
End If
Next j
'''some more code'''
end sub
As I walk through the macro, when it gets to this line:
If IsNumeric(Mid(stext, j, 1)) Or IsAlpha(Mid(stext, j, 1)) Then
it escapes the entire sub!
What am I doing wrong, and how do I resolve it?
I think this might help.
ISALPHA, ISNUMERIC? – Microsoft Access / VBA Answers