Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Columns on Every Sheet
Hi All,
If I want to insert a new column A&B on every sheet in the workbook I thought to run this sub: Sub INSERT_COLUMNS() Dim w As Worksheet For Each w In ActiveWorkbook.Worksheets Columns("A:B").Insert Next w End Sub What it does: On the active sheet it inserts 2 columns times the number of sheets in the workbook. So, if you have 5 worksheets...it inserts 10 columns on the active sheet! I am ashamed ... What is wrong with the code ... / me? Sige |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reference changes when I insert new columns in the source sheet | Excel Discussion (Misc queries) | |||
2007 excel work sheet will not allow to insert rows or columns | Excel Discussion (Misc queries) | |||
can't insert a column, can't shift columns off the sheet. | Excel Discussion (Misc queries) | |||
How to Insert Columns in a big Sheet... | Excel Worksheet Functions | |||
unable to insert columns in excel, insert- columns (disabled) | Excel Discussion (Misc queries) |