Automatic display of Unprotect Sheet dialog on Workbook Open RRS feed

  • Question

  • I have an Excel macro-enabled workbook (.xlsm) that has a number of sheets with ranges that are protected (not all). These sheets were protected programmatically via a VB.NET application.

    I'm seeing some strange behavior when I initially open this workbook. No matter which sheet was active when I previously saved it, on Open Excel immediately activates the protected sheet and displays the Unprotect Sheet password dialog. I can click Cancel on the dialog and it will be presented again, then after I click Cancel the second time, it goes away and then the formerly active sheet from the previous save is activated.

    The odd thing is that this behavior didn't happen in the past. I'm not sure what occurred to cause the behavioral change.

    So (in short), can anyone provide some insight on why Excel might do this on a workbook Open?

    1. Detect a protected sheet and immediately activate it, and 
    2. Present an Unprotect sheet dialog

    Also, if there anything that can be done on the Excel side to prevent it from happening?

    Any ideas and suggestions would, of course, be greatly appreciated.


    Chris Fleetwood

    Friday, August 3, 2018 1:45 PM

All replies

  • Hello Chris Fleetwood,

    What's the code in your add-in? What's the code in the xlsm file? Is there any possible that there is a conflict of them?

    Try to disable the add-in, what will happen?

    Try to enable the add-in and open a xlsx workbook, what will happen?

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, August 6, 2018 8:59 AM