title: CommandBars("Ply") won't reset on workbook beforeclose VBA Excel
body: <p>I am using the following code to prevent a user from right clicking the tabs in an Excel workbook :</p>
  
  <pre><code>application.CommandBars("Ply").Enabled = false
  </code></pre>
  
  <p>on the beforeclose event of the workbook, I am calling another procedure which contains </p>
  
  <pre><code>application.CommandBars("Ply").Enabled = true
  </code></pre>
  
  <p>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.</p>
  
  <p>Does anyone have an idea about how to reactivate this right click for all workbooks?</p>