Syntax
CountToolbars([Context])
Remarks
Returns the number of toolbars listed in the Toolbars dialog box (View menu). Note that not all toolbars are listed in all circumstances. For example, the macro toolbar only appears in the Toolbars dialog box when at least one macro-editing window is open.
Argument | Explanation |
Context | Specifies which toolbars to count: 0 (zero) The toolbars that are available when a document based on the Normal template is active 1 or omitted The toolbars that are currently available Note that the toolbars that are available depend on the custom settings, if any, of the active template, any loaded global templates, and the Normal template. |
Example
This example creates a new document and then inserts a list of toolbar names followed by the number of buttons on each toolbar.
FileNewDefault For i = 1 To CountToolbars(0) name$ = ToolbarName$(i) numbuttons = CountToolbarButtons(name$) Insert name$ + "," + Str$(numbuttons) + Chr$(13) Next i
See Also
CountToolbarButtons(), ToolbarButtonMacro$(), ToolbarName$()