|
-
Jun 27th, 2000, 01:59 AM
#1
Thread Starter
Member
I am using the input statement to read in data from a file,
Input #1, strInput
Some of the lines of the file have a comma in them, which cuts off the input and puts the rest of the line into the next input statement(i am using a do while loop).
I know that the Input Function does not use delimeters, but you have to specify the number of characters to read in. I do not know how many characters to read in because each line is a different size.
I guess my question is: Can I somehow make the Input Statement not use commas as a delimeter?
Thanks,
JK
-
Jun 27th, 2000, 03:08 AM
#2
_______
new project..listbox..command button.
'your LineInput function will work as well
'but this is pretty neat.
'change C:\my documents\try.txt" to your file.
'the results are what you want.
Option Explicit
Option Compare Text
Dim filesys, txtStream As Object
Private Sub Form_Load()
Dim myArr() As Variant
Dim i As Integer
Set filesys = CreateObject("Scripting.FileSystemObject")
Set txtStream = filesys.openTextFile("C:\my documents\try.txt")
Do Until txtStream.atendofstream
List1.AddItem txtStream.readline
Loop
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 27th, 2000, 03:21 AM
#3
Thread Starter
Member
I used Line Input # statement and it works great.
Thanks
jk
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
|