Excel: Toggling Menu Items Using a Command Macro

Last reviewed: November 1, 1994
Article ID: Q71629

SUMMARY

The "Microsoft Excel Functions and Macros" version 2.2 manual does not state that the "logical" argument is optional for many macro functions of the type "FUNCTIONNAME(logical)". Leaving the "logical" argument blank allows the function to be used as a toggle command, rather than specifically stating TRUE or FALSE to toggle the option [which would require knowing the status of the command prior to executing the FUNCTIONNAME(logical) command].

For example, to toggle the menu command Freeze Panes/Unfreeze Panes through a macro, use the following formula:

   =FREEZE.PANES()

This documentation error affects the following functions:

   A1.R1C1
   DATA.FIND
   ECHO
   FREEZE.PANES
   FULL
   LEGEND
   PRECISION
   SHORT.MENUS


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


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: November 1, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.