|
-
November 24th, 1999, 02:14 AM
#1
How to read strings from a text file
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
-
November 24th, 1999, 03:03 AM
#2
Re: How to read strings from a text file
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|