SHOW.BAR

Macro Sheets Only

Displays the specified menu bar. Use SHOW.BAR to display a menu bar you have created with the ADD.BAR function or to display a built-in Microsoft Excel menu bar.

Syntax

SHOW.BAR(bar_num)

Bar_num is the number of the menu bar you want to display. It can be the number of one of the Microsoft Excel built-in menu bars, the number returned by a previously executed ADD.BAR function, or a reference to a cell containing a previously executed ADD.BAR function.

If bar_num is omitted, Microsoft Excel displays the appropriate menu bar for the active workbook as shown in the following table.

Bar_num Bar displayed

1 A sheet or macro sheet (Microsoft Excel 4.0)

2 A chart (Microsoft Excel 4.0)

3 No active window

4 The Info window

5 A sheet or macro sheet (short menus)

6 A chart (short menus)

7 Shortcut menus 1 (for Cells, Workbook tabs, Toolbars, VB Windows)

8 Shortcut menus 2 (for objects)

9 Shortcut menus 3 (for chart elements)

10 A sheet or macro sheet

11 A chart

12 A Visual Basic module

13-35 Reserved for use by shortcut menus. These numbers will return an error if a macro tries to do anything with them.

37-51 Custom menu bar for macro use

Remarks

Example

The following macro formula displays short menus on a worksheet or macro sheet:

SHOW.BAR(5)

Related Functions

ADD.BAR Adds a menu bar

DELETE.BAR Deletes a menu bar

SHOW.TOOLBAR Hides or displays a toolbar

List of Customizing Functions