|
-
Apr 8th, 2001, 08:46 PM
#1
Thread Starter
New Member
I'm trying to import Data from a text file, which includes the following,
Vessel Name
000115600
000025600
000000000
000089000
000019000
000000000
6670.43
The above file is updated every five minutes and I wish to retreive this data in
order to perform calc's and then display a completion time for a process on the
User Form.
code:-----------------------------------------------------------------------------
---
Open "YourFile.txt" For Input As #1
While Not EOF(1)
Input #1, YourVariable
List1.Additem YourVariable
Wend
Close #1
--------------------------------------------------------------------------------
Instead of adding to a list as in the above example, I want to process it Line by
Line ( How do I achieve this using .Input ).
Help
-
Apr 8th, 2001, 08:47 PM
#2
PowerPoster
Use "Line Input #1" instead of Input #1
-
Apr 8th, 2001, 09:01 PM
#3
Thread Starter
New Member
Use "Line Input #1" instead of Input #1
Sorry - Still can't get it to work - must be doing something wrong , how should it be written for each line ?
-
Apr 9th, 2001, 01:07 AM
#4
This code works for me:
Code:
Dim YourVariable As String
Open "YourFile.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, YourVariable
List1.Additem YourVariable
Loop
Close #1
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
|