The problem might be that when you end your application , you don't really end it. If you just unload the form, it might not work, try using the End command

Code:
Private Sub Form_Unload(Cancel as Integer)
End
End Sub
that might help you, i dunno