hello
I have a listbox which contain grades I need to select the maximum grade.

Code:
    Private Sub maxbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles maxbtn.Click
        Dim i As Integer
        Dim m As Integer
        m = Me.MarkList.Items.Count - 1
        Dim Max As Double

        For i = 0 To m
            Max = MarkList.Items(0)
            If Max < MarkList.Items(i) Then
                Max = MarkList.Items(i)
            End If

        Next i

        Me.MarkList.SelectedIndex = i
    End Sub
should I write Me.MarkList.SelectedIndex = i to select the index? I have an error in this step I couldn't know what is the error in my statement.

Thanks