I have a very simple VB form which plays a mp3 file passed to it throuhg a main form. The user shuts the form manually, and can then reopen the form again witha new mp3 file. This works fine exactly 7 times (!), then I get an “FMOD Error! (31) An invalid object handle was used”. Why is this?

It is when trying to pause (se below) the error is generated, but any operation on the channle causes the same thing to happen. If I shut down teh project it works fine another 7 times and then the same error!!!

Here is the unload section of the form, it seem to execute correctly:
Private Sub Form_Unload(Cancel As Integer)
Dim Result As FMOD_RESULT

' Shut down
If SoundPlay Then
Result = FMOD_Sound_Release(SoundPlay)
ERRCHECK (Result)
End If
If SystemPlay Then
Result = FMOD_System_Close(SystemPlay)
ERRCHECK (Result)
Result = FMOD_System_Release(SystemPlay)
ERRCHECK (Result)
End If

End Sub

Here is the call from the main form:
Form1.MusicFile = FileToPlay
Form1.show vbModal, Soundman
Unload Form1
Set Form1 = Nothing