Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/101621

From BetaArchive Wiki

Microsoft Knowledge Base

Excel: Macro Commands to Show or Hide All Toolbars

Last reviewed: September 12, 1996
Article ID: Q101621

The information in this article applies to:

  • Microsoft Excel for Windows, versions 4.0, 4.0a
  • Microsoft Excel for the Macintosh, version 4.0

In Microsoft Excel version 4.0, you can use the SET.NAME() and IF() macro commands to show or hide all available toolbars.

To show all available toolbars, use the following lines of macro code:

   A1: =SET.NAME("AllToolbars",GET.TOOLBAR(8))
   A2: =IF(ISERROR(AllToolbars),,SHOW.TOOLBAR(AllToolbars,TRUE))

where:

  • Cell A1 gets the names of all available toolbars and stores the names as an array in the name AllToolbars.
  • Cell A2 checks to make sure that at least one toolbar exists in AllToolbars and, if so, shows all toolbars.

NOTE: Both lines should be entered as array formulas. In Microsoft Excel for Windows press CTRL+SHIFT+ENTER after you type the formula. In Microsoft Excel for the Macintosh, press COMMAND+RETURN.

To hide all available toolbars, use the following lines of macro code:

   A1: =SET.NAME("AllToolbars",GET.TOOLBAR(8))
   A2: =IF(ISERROR(AllToolbars),,SHOW.TOOLBAR(AllToolbars,FALSE))

where:

  • Cell A1 gets the names of all available toolbars and stores the names as an array in the name AllToolbars.
  • Cell A2 checks to make sure that at least one toolbar exists in AllToolbars and, if so, hides all toolbars.

Again, both lines must be entered as array formulas.

REFERENCES

"Function Reference," version 4.0, pages 206-207, 398


KBCategory: kbmacro

KBSubcategory:

Additional reference words: 4.00 4.00a standard howto



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.