Hide Userform when viewing a different workbook
I have a Userform attached to two worksheets in a workbook. The
userform cannot be closed on those two sheets (it can be minimized)
and the userform hides properly when a different worksheet is
activated; however, if the workbook is open and one of the two
worksheets is active and the user creates a new workbook or opens a
different workbook the userform stays front and center on the screen
instead of hiding. What code do I need to write so that the userform
is only on the screen when the appropriate worksheet is in the
forefront of the screen?
|