Break string into words

  • Thread starter Thread starter Tommy T
  • Start date Start date
T

Tommy T

Hey guys,
I'm looking to extract some info from textboxes on a
userform. The info could be 1-4 words. Is there a way I
can break a string of 4 words into 4 separate strings? I
know with Excel functions I could use Search to find the
spaces and then try to go from there, but is there a
better way?

Thanks,
TT
 
The VB "split" function will return a one dimensional array of substrings
and the default delimter is the space character. You can then check the
size of the array and deal with the substrings however you wish.

Steve
 
Thanks, that's exactly what I was looking for.
-----Original Message-----
The VB "split" function will return a one dimensional array of substrings
and the default delimter is the space character. You can then check the
size of the array and deal with the substrings however you wish.

Steve





.
 
Back
Top