Click to See Complete Forum and Search --> : How to read strings from a text file


Amrit
November 24th, 1999, 01:14 AM
I want to read indivisual character strings in a single row from a text file. The strings are separated by white space. What command is available in VB to read those strings. I dont want to use Line Input to read entire line and then break-up that line into individual strings.
Help me.
thanks in advance

AmritPalSingh
MTech Production
IIT Delhi
India
110029

Lothar Haensler
November 24th, 1999, 02:03 AM
dim a() as string
a = split(line, " ")
a(0) contains first element
a(1) second...

sample:

Dim a() as string
a = Split("this is a test")
MsgBox a(0)



requires VB 6