This keeps going to my error statement after one song is played. Can anyone find my error in code? I've included some notes it to help you follow it. Any help appreciated.
Code:Private Sub Timer2_Timer() On Error GoTo Nomoreitems counter.Caption = Format$(songTime - (Now() - origTime), "n:ss") If Now() > origTime + songTime Then 'check for end of song Timer2.Enabled = False counter = "" Songtitle = "" Frequency = "" bitrate = "" If shuffle.Checked = True Then 'Shuffle Play is enabled ListView2.SelectedItem = ListView2.ListItems(random) 'select random item Else 'Shuffle Play is disabled ListView2.ListItems(MusicMaster.ListView2.SelectedItem.Index + 1).Selected = True End If 'Load file information to player Let Songtitle = "*** " & ListView2.SelectedItem.Text & " ***" Let bitrate = ListView2.SelectedItem.SubItems(3) & " KBPS" Let Frequency = ListView2.SelectedItem.SubItems(4) & " KHZ" Let counter = ListView2.SelectedItem.SubItems(1) origTime = Now() songTime = "00:" & counter counter.Caption = Format$(songTime, "n:ss") Timer2.Enabled = True Call Playlister End If Exit Sub Nomoreitems: MsgBox "END OF PLAYLIST!" End Sub




Reply With Quote