XL2000: AutoSave Command Recorded in Subroutine or Macro (214288)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q214288

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")
				

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.

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.

Modification Type:MajorLast Reviewed:9/27/2003
Keywords:kbmacro kbnofix kbprb KB214288