|
-
Oct 11th, 2001, 12:02 AM
#1
Thread Starter
Fanatic Member
Can't find error in code!
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
-
Oct 11th, 2001, 12:12 AM
#2
try setting a breakpoint at the top of the sub, then step through the execution. You will be able to tell what line throws the error, and that will help us diagnose the problem.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 11th, 2001, 03:35 AM
#3
Conquistador
or, take out the error handling and see where the compiler stops ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|