Hi there folks! I am working on saving Math data my students are entering, into a textfile so I can view it later. I have 3 listboxes. StudentNameList, StudentAnswerList, StudentMarkList.
Here I am creating a textfile to write intoVB Code:
'Save the data to a textfile. Dim iFileNo As Integer iFileNo = FreeFile 'open the file for writing Open App.Path & "\Data" & "Grade " & GradeLBL.Caption & " SavedData" & "-" & DateLBL.Caption & ".txt" For Output As #iFileNo 'please note, if this file already exists it will be overwritten! 'close the file (if you dont do this, you wont be able to open it again!) Close #iFileNo
After the file is made and open, I would like to loop through the lists, and for each list index ( like StudentNameList(0), StudentAnswerList(0), and StudentMarkList(0). I would like to save to the same line of the textfile. Then go to the next index of the lists, (1), and so on.
Would anyone here know a trick for doing that?
Thanks a lot!




Reply With Quote