How would I be able to run through a text box and look at each letter? I want to be able to keep a loop until it reaches a space or apostophe. Is this even possible?
Printable View
How would I be able to run through a text box and look at each letter? I want to be able to keep a loop until it reaches a space or apostophe. Is this even possible?
Code:Dim intIndex As Integer
For intIndex = 1 To Len(Text1)
If Mid$(Text1, intIndex, 1) = " " Or _
Mid$(Text1, intIndex, 1) = "'" Then
Exit For
End If
Debug.Print Mid$(Text1, intIndex, 1)
Next