Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code to hide Toolbars - and have been trying to
develop a parallel to hide menus. This would keep me from having to idnetify each one through a line like: CommandBars(1).Controls("xxxx").Visible = False, but I can't seem to get it to work. In particular, I don't know what the type is (I can tell its # 10 what ever that is) and I don't seem to be able to assign the name (e.g. CBSheet.Cells(CBNum,1) = CB.Name. See below. Any thoughts? Sub Dim TB As CommandBar Dim TBNum As Integer Dim TBSheet As Worksheet Set TBSheet = Sheets("TBSheet") Application.ScreenUpdating = False TBSheet.Cells.Clear TBNum = 0 For Each TB in CommandBars If TB.Type = msoBarTypeNormal Then If TB.Visibile Then TBNum = TBNum + 1 TB.Visible = False TBSheet.Cells(TBNum,1) = TB.Name End If End If Next TB ' Add back items desired Application.CommandBars("Visual Basic").Visible = True Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
qn on counting in drop down menus and protecting/hiding specific worksheets | Excel Worksheet Functions | |||
Office Button Customization - Hiding Menus - Excel 2007 | Excel Discussion (Misc queries) | |||
New Menus - attaching but menus are reset | Excel Worksheet Functions | |||
Overriding Actions of Excel DropDown Menus and Poup Menus | Excel Programming |