ACC97: Can't Access ShortCut Menus CommandBar from CodeLast reviewed: August 29, 1997Article ID: Q162456 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. If you try to reference the Shortcut Menus toolbar using the CommandBars object model in Visual Basic for Applications, you may receive the following error message:
Run-time error '5': Invalid procedure call or argument CAUSEYou can't reference the Shortcut Menus toolbar using Visual Basic for Applications. It is the only toolbar that is not available using Visual Basic for Applications.
RESOLUTIONAlthough you cannot reference the Shortcut Menus toolbar through code, you can reference any custom shortcut menu through code. If you want to programmatically modify a custom shortcut menu through code, you will need to make a reference to the specific shortcut menu you are trying to change. This article demonstrates how to create a custom shortcut menu and then how to reference it using Visual Basic for Applications. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual. To create and reference a custom shortcut menu using Visual Basic for Applications, follow these steps:
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about custom shortcut menus, search the Help Index for "shortcut menus, creating," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: Word Powerpoint commandbar context command bar bars
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |