Thread: Splitting
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Splitting

To follow up on Bob's post... you can also declare a dynamic String variable
and assign the Split values to that instead.

Dim MyStringArray() As String
MyStringArray = Split(YourTextString, ";")

Note that all arrays created by the Split function are **always** zero-based
arrays (even if you use Option Base 1 in your code modules).

--
Rick (MVP - Excel)


"Bob Phillips" wrote in message
...
The clue is in the subject

myVar = Split(the_text,";")

myVar is then a variant array.

--
__________________________________
HTH

Bob

"Tree*Rat" wrote in message
6.253...
how do i get VBA to split items that are seperated by a colon ;

ie this;that;andmore

split into vars

var1 = this
var2 = that
var3 = andmore

Idealy I it would be split into an array