Screen 'Refreshing' - Too Much Code???
Hi Jim,
Well, as I stated in my post, the hiding the application is extreme. I
intentionally did not expand on that for the very reasons you cite here.
Probably, it would have been better had I not mentioned it, ..not knowing
anything about the OP, or his use of error handling techniques. -I accept
your objection and stand admonished!
As for the use of a class module for handling application events:
I guess the reason I prefer using this method is for the same reasons you
object to hiding the application, and the caution you gave at the end of your
post. What if something goes wrong with events disabled. I never have to
worry about that happening because Excel's events are always intact.
Also, in the case of an add-in, it works on any open workbook.
Regards,
Garry
"Jim Thomlinson" wrote:
Not to question your thought process but are you suggesting to hide the
application whenever the validation code runs? That would be very
disconcerting... Not to mention what happens if something goes wrong in the
code and it dies. The application is still open, but you can not get it back
(easily)... Any other spreadsheet syou have open will be trapped in the
application. New sheets will open in the hidden instance... Generally not
good.
As for your second suggestion I do not see the value in the class module
(Unless I am missing something). You can enable and disable the events with
Application.enableEvents. What value does your class have above and beyond
that...
--
HTH...
Jim Thomlinson
|