» Change the availability for the shortcut menus using VBA in Microsoft Excel
VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
CATEGORY - Menus, Toolbars, Status bar in VBA
VERSION - All Microsoft Excel Versions
The macro below shows how you can toggle the availability state for the shortcut menus.
Sub ToggleCommandBars()
Dim cbEnabled As Boolean
cbEnabled = Not CommandBars(25).Enabled
CommandBars(25).Enabled = cbEnabled ' shortcutmenu for cells
CommandBars(26).Enabled = cbEnabled ' shortcutmenu for columns
CommandBars(27).Enabled = cbEnabled ' shortcutmenu for rows
CommandBars("Toolbar List").Enabled = cbEnabled ' shortcutmenu for toolbars
End Sub
Book Store:
Recommended Books:
- Microsoft Access Version 2002 Step by Step
- Accounting Principles, with CD, 6th Edition
- Windows XP All-in-One Desk Reference For Dummies
- Lower Your Taxes - Big Time! : Wealth-Building, Tax Reduction Secrets from an IRS Insider
- Personal Finance for Dummies
- The Guide to Understanding Financial Statements
No comments have been submitted.

