Sub HideAllToolbars()
Dim TB As CommandBar
Dim TBNum As Integer
Dim mySheet As Worksheet
Set mySheet = Sheets("mySheet")
Application.ScreenUpdating = False
mySheet.Cells.Clear
TBNum = 0
For Each TB In CommandBars
If TB.Type = msoBarTypeNormal Then
If TB.Visible Then
TBNum = TBNum + 1
TB.Visible = False
mySheet.Cells(TBNum, 1) = TB.Name
End If
End If
Next TB
Application.ScreenUpdating = True
End Sub
|