andy99
04-14-2003, 01:36 PM
I have a list box on my form and when an item is selected it shows certain text in the text box.
What I am not sure about doing is loading the file into an array first.
The file is as follows:
Line Of Text 1
Line Of Text 2
'
Line Of Text 3
Line Of Text 4
Line Of Text5
'
Line Of Text 6
etc
I want it so when the text is shown in the text box it still shows as 2 or 3 lines and the empty line is included in the string. All the data for each element of the array is seperated by an apostrophe.
I have worked out what I think I should be doing, but I'm not quite sure how to quite get there.
Open App.Path & "GradingAikido.txt" For Input As #filenum
'...load whole file into one long string
Strwords =
Do Until EOF(filenum)
'...split at each apostrophe
tmpstrwords =
'...load into array element
aikido(ctr) =
'...set new last position
lastpos =
'...empty temp string
tmpStrWords = ""
End
Close #filenum
What I am not sure about doing is loading the file into an array first.
The file is as follows:
Line Of Text 1
Line Of Text 2
'
Line Of Text 3
Line Of Text 4
Line Of Text5
'
Line Of Text 6
etc
I want it so when the text is shown in the text box it still shows as 2 or 3 lines and the empty line is included in the string. All the data for each element of the array is seperated by an apostrophe.
I have worked out what I think I should be doing, but I'm not quite sure how to quite get there.
Open App.Path & "GradingAikido.txt" For Input As #filenum
'...load whole file into one long string
Strwords =
Do Until EOF(filenum)
'...split at each apostrophe
tmpstrwords =
'...load into array element
aikido(ctr) =
'...set new last position
lastpos =
'...empty temp string
tmpStrWords = ""
End
Close #filenum