vba - automatically close excel userform when change sheet -
I have a user form that automatically appears when a new sheet is created from the pivot table drill Trying to know how to automatically shut down the user, that the user navigates to any other sheet in the workbook.
To check the name of that worksheet, This event is available in the You can read about here. I believe the user will need to be modeless to the user's units. workbook code> workbook , which is active and take action accordingly. For example:
Private Sub WorkbooksActivate (biweble as an object) If Sh.Name = "Sheet1" and UserForm1.Visible then unload on UserForm1 ending
ThisWorkbook module in your Excel workbook.
Comments
Post a Comment