Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: AutoSave Command Recorded in Subroutine or Macro


View products that this article applies to.

This article was previously published under Q214288

↑ Back to the top


Symptoms

In Microsoft Excel 2000, if you record a Visual Basic for Applications macro while the AutoSave add-in is functioning, and the AutoSave add-in prompts you to save a file while you are recording, the following line of code is recorded in your subroutine.
Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")
				

↑ Back to the top


Cause

This problem occurs because the macro recording system in Microsoft Excel is aware of macros that are assigned to run at a certain time (for instance OnTime macros). If such a macro runs while the macro recorder is operating, the command to run that macro is recorded.

↑ Back to the top


Workaround

To work around this behavior, use either of the following methods:
  • After you have finished recording your macro, remove or comment out any commands that should not be contained in the macro.

    -or-
  • Before starting to record a new subroutine or macro, turn off any OnTime macros that are present.

    For example, to turn off AutoSave in Microsoft Excel 2000, follow these steps:
    1. On the Tools menu, click AutoSave.

      If AutoSave is not displayed on the Tools menu, the AutoSave add-in is not installed. To install this add-in, follow these steps:
      1. On the Tools menu, click Add-Ins.
      2. In the Add-Ins dialog box, select AutoSave Add-in.
      3. Click OK to install the add-in.
    2. In the AutoSave dialog box, click to clear the Automatic Save Every check box.
    3. Click OK to accept the change.

↑ Back to the top


Keywords: KB214288, kbprb, kbnofix, kbmacro

↑ Back to the top

Article Info
Article ID : 214288
Revision : 4
Created on : 9/27/2003
Published on : 9/27/2003
Exists online : False
Views : 243