Excel: INSERT(2) in Macro Repeats INSERT Command ContinuouslyLast reviewed: November 29, 1994Article ID: Q32363 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, if there is an =INSERT(2) command below the current active cell, the macro will repeatedly insert a cell. This behavior occurs because of the way Microsoft Excel internally tracks which macro statement was just executed. Microsoft Excel keeps track of this information by remembering the cell reference. NOTE: This behavior will occur only if the macro is run with the macro sheet active and with the cell containing the INSERT() command located below the active cell on the sheet. When the insertion is done, the active cell is now the new blank cell that was inserted. Microsoft Excel then moves to the next cell to execute the next command. The next command is the INSERT() command because it was moved down with the previous INSERT() command. This feature is by design. To reproduce this behavior, create the following macro:
A1: Record1 A2: =INSERT(2) A3: =RETURN()Select cell A1 on the macro sheet and run the macro (leaving the macro sheet active). The macro statements will move down column A until the macro is canceled or it reaches row 16,384. To cancel the macro, press COMMAND+. (PERIOD) or ESC (the ESCAPE key on an extended keyboard).
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |