Looping

  • Thread starter Thread starter Louise
  • Start date Start date
L

Louise

Is there anyway of looping through each character in a
text box to compare the ascii number with something else?
 
Hi

Sure

Private Sub CommandButton1_Click()
Dim S As String
Dim L As Long
S = Me.TextBox1.Text
For L = 1 To Len(S)
MsgBox Asc(Mid$(S, L, 1))
Next
End Sub


HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top