InsertRowsOrColumns |
This page in 2003 Top Previous Next |
|
Inserts rows or columns at the point indicated, even (unlike Excel's Insert command) if they intersect array constants, array formulas or data tables. Applies to SYNTAX result = expression1.Insert expression2.Insert(Range, copyFormula) expression1 Required. An expression that returns an IOAKAddIn object. expression2 Required. An expression that returns an IOAKAPI object. result An OAKResult enumeration indicating the success or otherwise of the action. Range Required Range. The range at which rows or columns are to be inserted. copyFormula TRUE if the method is to fill the inserted cells with copies of their neighbours; FALSE if the inserted cells are to be left blank. Remarks When applied to an IOAKAddIn object, the Insert method performs the same action as the OAK Development | Insert Columns/Rows command. It inserts rows or columns at the current selection, even if that selection intersects array constants, array formulas or data tables. Just as the equivalent OAK user-interface command does, the command will ask the user whether or not to fill the inserted cells by copying the contents of neighboring cells. When applied to an IOAKAPI object, the Insert method inserts rows or columns at the range indicated by the parameter submitted to the method. Whether or not to fill the inserted cells with copies of their neighbours is indicated by the second parameter to the method. Wrinkles To specify what is to be inserted unambiguously, Range needs to be one or more entire rows or one or more entire columns. It must consist of a single area only; a multi-area range will generate an error. Though the Insert method can insert rows or columns that pass through array constants, array formulas or data tables, it cannot perform insertions that intersect pivot tables. The InsertRowsOrColumns method will not work on worksheets that are protected. |