title: Minimum values for a list box VB 2015
body: <p>i need help calculating the lowest grade in a list box i had it working but i forgot what i did and also forgot to save now its not doing anything and just outputting 0</p>
  
  <pre><code>Private Sub btncalc_Click(sender As Object, e As EventArgs) Handles btncalc.Click
  
      For i As Integer = 0 To lstgrade.Items.Count - 1
          sum = sum + CInt(lstgrade.Items(i))
  
          If lstgrade.Items(i) &lt; 100 Then
              min = lstgrade.Items(i)
          Else
  
  
          End If
      Next
  
      avg = sum / lstgrade.Items.Count
      txtlow.Text = min
      txtavg.Text = CStr(avg)
  </code></pre>