Putting text file entries into an array
Hey all!
OK, what I want to do is put a whole bunch of names into an array from a text file. The names are already in correct order, all I want to do is get entry #1 into label #1, entry #2 into label #2 etc. How do I do this?
This is what I've got, but I know it doesn't work.
Code:
Private Sub Form_Load()
Dim Name as String, i as String
Open "c:\lenny\collingwood\files\Players.txt" For Output As #1
For i = 1 To 52
Input #1, Name
lblPlayer(i).Caption = Name
Name = ""
Next i
End Sub
Thanks in advance for any help you can offer.