Hide all toolbar buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is the a quick method to hide all toolbar buttons whilst a particular workbook remains open??
 
Assuming you meant to hide buttons on the Worksheet Menu
Bar only then I think the following is what you're looking
for. Paste to the ThisWorkbook module of the workbook
involved.

Private Sub Workbook_Open()
Dim Btn As CommandBarControl
For Each Btn In Application.CommandBars(1).Controls
If Btn.Type = msoControlButton Then Btn.Visible = False
Next
End Sub

Private Sub Workbook_Deactivate()
Dim Btn As CommandBarControl
For Each Btn In Application.CommandBars(1).Controls
If Btn.Type = msoControlButton Then Btn.Visible = True
Next
End Sub

Regards,
Greg

-----Original Message-----
Is the a quick method to hide all toolbar buttons whilst
a particular workbook remains open??
 
Back
Top