Insert Row in Macro Can Cause Infinite Loop
PSS ID Number: Q11047
Article last modified on 01-12-1989
PSS database name: D_MPlan

2.x 3.x 4.00

MS-DOS


Summary:
   A macro containing an Insert Row command can be thrown into an
infinite loop. This problem occurs if the macro performing an Insert
Row command is executed from any row above the area containing the
macro. 
   This problem occurs because Multiplan records the cell reference
for the cell immediately below the cell being executed. This is the
cell containing the next set of instructions. 
   If a row is inserted above this macro area, the current cell
becomes the cell to which the macro will go to get those next
instructions. As a result, the macro repeats the cell containing the
Insert Row instructions in an infinite loop. 
  The workaround for this problem is to make sure that the macro
resides in an area of the spreadsheet above the place where you are
inserting rows. 

Copyright Microsoft Corporation 1989.