| re: CommandBars in Access 2002/2003
By trial and error, this list seems to be exhaustive.
Whatever other toolbars there are, they cannot be made visible once this
code is run.
Private Sub Form_Open(Cancel As Integer)
Dim varCb As Variant
'On Error Resume Next
For Each varCb In Array( _
"Task Pane", "Database", "Menu Bar", "Report Design", _
"Page View", "Alignment and Sizing", "Formatting (Page)", _
"Formatting (Datasheet)", "Print Preview", "Form Design", _
"Toolbox", "Form View", "Formatting (Form" & Chr(47) & "Report)", _
"Source Code Control", "Relationship", "Table Design", _
"Table Datasheet", "Query Design", "Filter/Sort", _
"Macro Design", "Utility 1", "Utility 2", "Page Design", _
"PivotTable", "PivotChart", "Query DataSheet", "Web", _
"Formatting (PivotTable" & Chr(47) & "PivotChart)")
CommandBars(varCb).Enabled = False
Next
End Sub
'Private Sub Form_Open(Cancel As Integer)
' Dim cb As CommandBar
' For Each cb In CommandBars
' cb.Enabled = True
' Debug.Print cb.Name
' Next
'End Sub |