When I run this code, the data I want to write will not be written to the file. After a few failed attempts at making this work, I set some breakpoints, and all of the variables are being set correctly, as is the code in the While loop. For some reason, though, the data I am trying to write to the file is still never written.
ratings(theindex) = txtrating.Text
names(theindex) = MediaPlayer1.FileName
Open "ratings.txt" For Output As #1
Dim appenddata As String
theindex = 0
While theindex < 10000 And names(theindex) <> ""
appenddata = names(theindex) & "¦" & rating(theindex)
Print #1, appenddata
theindex = theindex + 1