The information in this article applies to:
SUMMARYIn Microsoft Office 97, Service Release 1 (SR-1), the CommandBars object model allows you to turn off (disable) the Toolbars shortcut menu. This simplifies preventing others from changing the toolbars and menus of a custom application that you develop with Microsoft Office 97. MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.asp Turning the Toolbar Shortcut Menu On and OffThe following Visual Basic for Applications subroutine turns off (disables) the Toolbar List shortcut menu:
After you run this subroutine, the Toolbars command on the View menu is
unavailable. Also, you cannot display a list of available toolbars by
pointing to and then right-clicking a toolbar.
The following subroutine turns on (enables) the Toolbar List shortcut menu:
Preventing Users from Changing Menus and ToolbarsSetting the Visible property of the Toolbar List shortcut menu does not prevent others from making changes to the menus and toolbars of a custom application. To prevent others from changing the menus and toolbars in a custom application, remove or turn off the Customize option on the Tools menu and turn off the Toolbar List shortcut menu.The following sample subroutine turns off the Toolbar List shortcut menu and deletes the Customize menu option, which prevents others from modifying the menus and toolbars in a custom application:
You can use the following subroutine to restore the Customize menu command
and allow others to display the Toolbar List shortcut menu:
REFERENCES
For more information about customizing command bars, click the Office
Assistant in the Visual Basic Editor, type commandbars, click Search, and
then click to view "Using command bars".
Q120802 Office: How to Add/Remove a Single Office Program or Component Additional query words: xlvbainfo
Keywords : kbinterop kbprg |
Last Reviewed: January 10, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |