title: Hide New Sheet tab
body: <p>How can I get rid of the last workbook tab that allows a user to add a new sheet in my Excel Viewer control?</p>
  
  <p><img src="https://i.stack.imgur.com/iEBEN.png" alt="SO16766034 question example"></p>
  
  <p>I have found the following code to hide the button in the above image:</p>
  
  <pre><code>ExcelViewer1.Application.CommandBars["Workbook tabs"]._  
                Controls["Sheet List"].Visible = false;
  </code></pre>
  
  <p>but it throws a COM Exception:  </p>
  
  <blockquote>
    <p>"Error HRESULT E_FAIL has been returned from a call to a com component".</p>
  </blockquote>
  
  <p>The same command works for other commandbars like Ply, Cell.</p>