Having reviewed this, it looks like I answered the wrong question.
Your code is called from the close event. Do you mean the BeforeClose event?
Assuming you do, where are you setting the Cancel param to True?
--
Rob
http://www.asta51.dsl.pipex.com/webcam/
This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.