Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

[RESOLVED] Load a textfile to the first column in a listview

$
0
0
Hello there everyone. I am working on an program for tracking student picks when they do literacy stations, and I was working on changing a few things for future versions. See when the prog loads, it will load a textfile to a listbox, but for this new version, I thought it might be a good idea to make a listview so teachers can see the student picks for a whole week.

So I am starting small, I have this code that loads a textfile to a listbox...

VB Code:
  1. 'THIS CODE WILL LOAD STUDENT CHOICES FROM OTHER TIMES THEY PICKED
  2.  
  3. Dim sFileText As String
  4.     Dim iFileNo As Integer
  5.       iFileNo = FreeFile
  6.           'open the file for reading
  7.  Open App.Path & "\TrackerSettings\Roster" & RosChosenNumTXT.Text & "\StudentLiteracyStationPicks\Student11\StudentPICK" & WeekDay.Caption & ".txt" For Input As #iFileNo
  8.     'change this filename to an existing file!  (or run the example below first)
  9.           'read the file until we reach the end
  10.       Do While Not EOF(iFileNo)
  11.         Input #iFileNo, sFileText
  12.           'show the text (you will probably want to replace this line as appropriate to your program!)
  13.         LiteracyStation.StudentChoices(10).AddItem sFileText
  14.       Loop
  15.           'close the file (if you dont do this, you wont be able to open it again!)
  16.       Close #iFileNo
  17. 'NOW CHECK TO SEE WHAT PICKS THEY HAVE ALREADY DONE

AS you can see. The code will load the file to LiteracyStation.StudentChoices(10).AddItem, but if I had a listview called RESULTSVIEW, is there a way to load to the first column? Is there an equivalent to loading to the first column of the resultview column?

Thank you so much!!! :D

Viewing all articles
Browse latest Browse all 21271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>