Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is the code for a module I have based on Steven Roman's "Writing Excel
Macros with VBA". I now need to have a module that will take the data stored in sheet3 and enable the toolbars I've disabled here. Can I get some help on how I would read this data from sheet3 and enable the toolbars? Thanks in advance. Hal Option Explicit Public Sub ListCmdBars() Dim sType As String, cbar As CommandBar, rng As Range Dim cbarCount As Integer, lRow As Long, lCol As Long lRow = 2 lCol = 2 Sheets("Sheet3").Cells(lRow - 1, lCol - 1) = "Name" 'cbar.Name Sheets("Sheet3").Cells(lRow - 1, lCol) = "Type" 'sType Sheets("Sheet3").Cells(lRow - 1, lCol + 1) = "Visible" 'cbar.Visible For Each cbar In Application.CommandBars Select Case cbar.Type Case msoBarTypeNormal 'A toolbar sType = "Normal" Case msoBarTypeMenuBar 'A menu bar sType = "Menu Bar" Case msoBarTypePopup 'Menu, Submenu sType = "Popup" End Select If cbar.Visible = True Then Sheets("Sheet3").Cells(lRow, lCol - 1) = cbar.Name Sheets("Sheet3").Cells(lRow, lCol) = sType Sheets("Sheet3").Cells(lRow, lCol + 1) = cbar.Visible cbar.Enabled = False lRow = lRow + 1 End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel toolbar like word toolbar, please | Excel Discussion (Misc queries) | |||
Form Toolbar verses Control Toolbar | Excel Discussion (Misc queries) | |||
Adjusting toolbar size, restore toolbar | Excel Discussion (Misc queries) | |||
How can I keep Toolbar Buttons on the toolbar? | Setting up and Configuration of Excel | |||
saving toolbar buttons on custom toolbar | Excel Programming |