I have an Exit button that Unloads the form and a long series of calculations and DoEvents. When the Exit button is clicked, the form uloads but the code continues to execute and causes an error (obviously the vars, arrays, etc. no longer exist!). Microsoft says to use "Set form1 = Nothing" but this doesn't appear to do anything.

Is there a way to get the code to really terminate?

Jon