Start New Discussion within our Software Development Community

Well i have this assignment about a trivia game pretty much i figured everything out besides, sorting my high scores and deleting questions.

this is how i put the information for high scores i need to be able to sort from highest to lowest via scores :

If ScoreTrack > 50 Then
intScoresFile = FreeFile
IngRecLengthS = LenB(temp)
Open (App.Path & "/HighScores.txt") For Random As #intScoresFile Len = IngRecLengthS
Call Scores(intScoresFile, IngRecLengthS, HSrecords)
newscore.strScore = ScoreTrack
newscore.strName = InputBox("Please enter name, so your score will be saved to high scores.", "Scores")
Put #intScoresFile, (HSrecords + 1), newscore
Close #intScoresFile
ElseIf ScoreTrack < 50 Then



MsgBox "Sorry, but your score is too low.", vbOKOnly, "Score"
End If
intScoresFile = FreeFile
IngRecLengthS = LenB(temp)
Open (App.Path & "/HighScores.txt") For Random As #intScoresFile Len = IngRecLengthS
Call Scores(intScoresFile, IngRecLengthS, HSrecords)
For X = 1 To HSrecords
Get #intScoresFile, X, HSone(X)
HSone(X).Num = X
Next X
Close #intScoresFile 

and this is how put my information into a listbox, the one i wanna edit from: 
intQuestionsFile = FreeFile
IngRecLength = LenB(temp)
Open (App.Path & "\RandQuestions.txt") For Random As #intQuestionsFile Len = IngRecLength
Call Records(intQuestionsFile, IngRecLength, numrecords)
For X = 1 To numrecords



Get #intQuestionsFile, X, Questions(X)



Questions(X).Num = X



List1.AddItem Questions(X).Num & Questions(X).strQuestion & Questions(X).Category & Questions(X).strAns
Next X

frmAddQuestions.Y = LOF(intQuestionsFile) / 165

Debug.Print frmAddQuestions.Y

Close #intQuestionsFile
cmdEdit1.Enabled = False

Thanks in advance, :)

This article has been dead for over six months. Start a new discussion instead.