Hello ...
I figure out this .. try this code
CODE
Private Sub btnHighest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHighest.Click
lstMovies.SelectedIndex = HighLow(True)
End Sub
Private Sub btnLowest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLowest.Click
lstMovies.SelectedIndex = HighLow(False)
End Sub
Private Function HighLow(ByVal IsHieghest As Boolean) As Integer
Dim X, hNDX, lNDX As Integer
Dim Total As Integer
Dim Max As Integer = 0
Dim Min As Integer = 9999
For X = 0 To lstMovies.Items.Count - 1
Total = intEvening(X) * 8 + intMatinee(X) * 6
If Total > Max Then Max = Total : hNDX = X
If Total < Min Then Min = Total : lNDX = X
Next
If IsHieghest Then Return hNDX Else Return lNDX
End Function
The function calculate the maximum and minimum of each movie alone and returns the index of the movie in the list.
note ... if you pass true, the function return the max movie index other wise will return min movie index
P.S. you need to use
CODE
If lstMovies.SelectedIndex = -1 then Exit sub
... to prevent errors .. i beleive you know this ...