13
Customizing Menus and Toolbars

Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Customizing Menus and Toolbars

Page 2: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Manipulating Command Bars

• Customize:– Right-click any place on a command bar and

cick Customize …• Customize window:

– Toolbars, Commands, Options

• Moving and resizing command bars

• Showing and hiding command bars

Page 3: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Showing and hiding toolbar buttons

• Click (not right-click) the Toolbar Option button

• Click Add or remove buttons

Page 4: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

How to remove “Type a question for help” box

• With the Customize window open, – Right-click the box– Clear the checkbox next to the Show the Ask

Page 5: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Changing the Properties of Built-In Buttons

• Open the Customizing window• Select the toolbar from the Toolbar list• Right-click the button in the toolbar and choose

the property to change:– Name– Change button image– Properties window:

• ScreenTip• OnAction

– Macro– VBA function: =MsgBox(“Hello”)

Page 6: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Restoring Toolbar Default

• With Customizing window open:– Click Toolbars tab– Select the toolbar– Click Properties button– Click Restore Defaults button

Page 7: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Creating New Toolbar

• With Customizing window open:– Click Toolbars tab– Click the New button– Enter a name– Adding buttons to the new toolbar

• Click Commands tab• Select Categories• Select commands• Drag the command to the new toolbar

Page 8: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Creating New Button• With the Customizing window open:

– Click Commands tab– Click File in the Categories box– Click the Custom button– Drag the Custom button to the toolbar– Right-click the new Custom button in the toolbar to

change properties:• Name• Default style• Text only• Assign hyperlink• Properties

– Screen tip– OnAction

Page 9: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Creating Menu and Submenu

• With the Customizing window open:– Click Commands tab– Click New Menu in the Categories box– Drag the New Menu to the toolbar– Right-click the new menu to assign a new

name for the menu– Select and drag buttons to the new menu

• Submenu– Same procedure

Page 10: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Attaching a Customer Command Bar to an Object

• Forms, reports and Commands have properties to attach a custom toolbar or menu bar.

Page 11: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

The CommandBars Collection

• Application– CommandBars

• This collection contains:– Menu bars– Toolbars– Shortcut menus– Custom command bars

Page 12: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

Access Built-in command bars

• 1 menu bar named “Menu Bar”

• 51 tool bars

• 126 shortcut menus

Page 13: Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,

To Retrieve a Commandbar from the Collection

• CommandBars(“commandbar name”)• Commandbar properties:

– Object browser

• Example:– Private Sub Command0_Click()– CommandBars("menu bar").Enabled = True– End Sub– Private Sub Command1_Click()– CommandBars("menu bar").Enabled = False– End Sub