|
-
Dec 11th, 2000, 05:57 PM
#1
Thread Starter
New Member
Hello everyone,
I am working on a lab. I have created a data file, Products.txt. I need to load the info from Products into an array, mProducts. How can I ccomplish that?
Any ideas or any help you could offer would be greatly appreciated. Thanks!!
-
Dec 11th, 2000, 06:13 PM
#2
_______
<?>
get you started.
Dim myFile as string, myVar as string
myFile = "C:\Products.txt"
dim intNum as integer, i as integer
intnum = freefile
dim mProducts()
open myfile for input as intnum
while not eof(intnum)
redim preserve mProducts(i)
line input #intnum, myVar
mProducts(i) = myVar
loop
Close #intnum
'to check it out add a list box and run this
for i = lbound(mProducts) to Ubound(mProducts)
list1.additem mProducts(i)
next i
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Dec 12th, 2000, 03:24 PM
#3
Thread Starter
New Member
Data Files
I appreciate the last reply I recieved but it did not work...
Maybe I did something wrong. Any further assistance you could offer I would really appreciate!
Thanks!
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
|