Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get char by char in a string

Status
Not open for further replies.

Gti

Programmer
Jul 23, 2001
99
PT
I have a string and i want to run the string schar by char.

(e.g

String -> ABCDEFGHIJKLMNOP

I want to see de first char ( A ) the next char .....

How can i do it?

Tkx

;-)
 
dim str as string

dim x


str = "ABCDEFGH"

for x = 1 to 8

debug.print left(str,x)

next


 
Gti,

This should work:

Dim s As String
Dim iLen As Integer
Dim iCount As Integer


s = "abcdefg"

iLen = Len(s)
For iCount = 1 To iLen

MsgBox Mid$(s, iCount, 1)

Next iCount
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top