String Tokens

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

How do I tokenize a string into individual chars and then
access the elements in order to create a scroll effect in
a textbox? Is this possible through an array?

I don't know if this is the best way to make a textbox
scroll, but is the only thing I can think of besides doing
MID().
 
The split command will break out a string into a array.

dim vBuf as Varient
dim strTest as string


strTest = "Apple;Orange;Banana"

vbuf = split(strTest,";")

vBuf is now an array with 3 elements of that string.

One the other hand, a list box can directly accept a string with "," or ";"
as the delimiter and list it for you with no code at all..


me.MylistBox.RowSouce = strTest
 
Eric said:
How do I tokenize a string into individual chars and then
access the elements in order to create a scroll effect in
a textbox? Is this possible through an array?

I don't know if this is the best way to make a textbox
scroll, but is the only thing I can think of besides doing
MID().

I expect you could stuff the string into a character array, but why?
What's wrong with

' scroll text box one character to the left
txtMyTextbox = Mid(txtMyTextBox, 2) & Left(txtMyTextbox, 1)

?
 
Back
Top