XL97: Macro Recorder Doesn't Record Some Menu Commands

Last reviewed: March 13, 1998
Article ID: Q159223
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

When you click a menu command while recording a Visual Basic for Applications macro, Microsoft Excel does not record the macro code for the menu command you clicked. When you run the recorded macro, it may not perform as expected.

CAUSE

This problem occurs if while recording a macro, you click a menu command that was added to a menu by an add-in file included with Microsoft Excel 97. For example, when you click Save As HTML on the File menu while recording a macro, the recorded macro does not contain code to run the macro assigned to the Save As HTML command. Microsoft Excel does not record the code because the menu command was added by the Html.xla add-in file.

RESOLUTION

If you are creating a macro that executes code assigned to a menu command, you must manually edit the macro and add the appropriate code. Code assigned to a menu will be assigned using the OnAction property in Microsoft Visual Basic for Applications.

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q162040
   TITLE     : XL97: Sample Macros to Customize or Replace a Menu Bar

Note that some of the affected menu commands use their own commands; for example, the Solver add-in contains commands that you can add to your macro when you want to set up and execute the Solver.

Note: Add-in macros cannot be edited as they are protected and hidden.

STATUS

This behavior is by design in Microsoft Excel 97.

MORE INFORMATION

When you record a Visual Basic for Applications macro, Microsoft Excel 97 does not record the following menu commands.

   Menu    Command                Submenu command
   -----   --------------------   ---------------

   Tools   AutoSave
   Tools   Data Analysis
   Tools   Look Up Reference
   Tools   Solver
   Tools   Wizards                Conditional Sum
   Tools   Wizards                File Conversion
   Tools   Wizards                Lookup
   Tools   Wizards                Web Form
   File    Save As HTML
   Data    Convert to MS Access
   Data    MS Access Form
   Data    MS Access Report
   Data    Template Wizard

Microsoft Excel 97 records the following menu commands.

   Menu   Command
   ----   --------------

   View   Custom Views
   View   Report Manager


Additional query words: XL97
Keywords : kbmacro xlvbahowto xlvbainfo xladdins kbfaq
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb


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