To insert or delete rows or columns on multiple sheets, either use a For Each...Next statement to loop through all the required sheets or select the rows or columns before you perform the insertion or deletion.
NOTE: The following sample macros work only on a contiguous range of columns or rows.
Sample macro using a loop to insert rows in multiple sheets
Dim CurrentSheet As Object
' Loop through all selected sheets.
For Each CurrentSheet In ActiveWindow.SelectedSheets
' Insert 5 rows at top of each sheet.
Sample macro to select column and insert new columnThe following sample macro selects the entire column before it inserts new columns:
Dim MyRange as Object
' Store the selected range in a variable.
Set MyRange = Selection
' Select the entire column.
' Insert Columns in all selected sheets.
' Reselect the previously selected cells.
Article ID: 291305 - Last Review: Jan 31, 2007 - Revision: 1