If you are handling the modal dialogue close command, then you have an error in logic as Victor says in post #13. Whatever your code is doing for the modal dialogue close command is not correct. You should be able to debug/trace your modal dilogue close code and find the source of the 'crash' during this code.