[AccessD] Trouble using Split command

Stuart McLachlan stuart at lexacorp.com.pg
Fri Apr 22 17:14:32 CDT 2011


Why didn't you say so :-)

Dim LineText as string
Dim Elements() as string
DIm x as long

LineText = "                                0.000            243.729             -      61.495              -     "

'Reduce multiple spaces to singles
While instr(Linetext,"  ") > 0
  LineText = Replace(LineText,"  "," ")
Wend

'Get the data
Elements()  = Split(LineText," ")

'Do something with the data
For x = 1 to  UBound(Elements())
   debug.print Elements(x)
Next

On 22 Apr 2011 at 13:05, Kaup, Chester wrote:

> Thanks for everyone's help and suggestions. I wanted to get out just
> the 5 data elements. Obviously I need a different plan.
> 





More information about the AccessD mailing list