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, 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   

This event is available in the ThisWorkbook module in your Excel workbook.

You can read about here. I believe the user will need to be modeless to the user's units.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -