IProgressDialog2, can't hide if there's an error, ArcMap is frozen/stuck

Discussion created by TW_WebMap on Jan 3, 2013
Latest reply on Jan 4, 2013 by dubravko.antonic-gdi-net-esridist
I'm using code similar to the "Show Progress Dialog Snippet", which is inside a Try - Catch - End Try block.  When there's an error, the code exits the subroutine, which is what I want it to do, but the progress dialog is still up, and I can't get it to go away, and nothing else can be done until I force ArcMap to shut down.

Does anybody know how to hide the progress dialog when there's an error?  I suppose I could make it a public variable, so the error handler can see it, but that seems pretty roundabout.