Hey Dave,
I did some experimenting while I was waiting and found 2 UserForm
events I was not familiar with: Deactivate & Terminate (I didn't see
QueryClose or I would have tried that one as well, which I did after
reading your last reply). I put MsgBoxes in each to identify them,
then I tested them.
Is there any difference between Terminate & QueryClose? I noticed
that QueryClose has arguments and Terminate does not. But I don't
know which is the better event to use. Could you explain the pro's &
con's of each? Thanks
Deactivate never fired but both QueryClose & Terminate did (in that
order). Placing the EnableEvents code in either one of those seems to
work. Thanks.
I really do not know when I need to turn off or turn on the various
error preventing routines. So I have taken the shotgun approach:
-----------------------------------------------------------------------------------
In UserForm_Initialize I started with:
With Application
.EnableEvents = False
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
-----------------------------------------------------------------------------------
In UserForm_QueryClose I finished with:
With Application
.EnableEvents = True
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
-----------------------------------------------------------------------------------
My workbooks were so big I had to do something, this was the first
thing I tried. It worked - sort of.
I have since split the worksheets into individual workbooks (boy is
that a pain to go from formulas in the same workbook to vba across
many workbooks). But it is moving along. This situation is part of
the legacy of that spit (this project is much bigger then I
anticipated. It's going on two years now and I'm not even half-way
there yet. But I am learning quite a bit as I go).
Thanks again for your help, Dave, it is really appreciated.
-Minitman