I am using the following code to prevent a user from right clicking the tabs in an Excel workbook :
application.CommandBars("Ply").Enabled = false
on the beforeclose event of the workbook, I am calling another procedure which contains
application.CommandBars("Ply").Enabled = true
Debugging step by step helped me understand the command actually reactivates the right click for the active workbook but it does not for other workbooks/or the application. After closing, if I open another workbook with no protection at all, the right click on tabs is not enabled.
Does anyone have an idea about how to reactivate this right click for all workbooks?