Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making a change in all worksheets
I am trying to delete a column in all worksheets. The code i'm using only
deletes the column in the first worksheet, but not the rest of them. Dim sht As Worksheet For Each sht In ThisWorkbook.Worksheets Columns("D:D").Select Selection.Delete Shift:=xlToLeft Next sht Any help would be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making a change in all worksheets
Try this...
Dim sht As Worksheet For Each sht In ThisWorkbook.Worksheets sht.Columns("D:D").Delete Shift:=xlToLeft Next sht -- HTH... Jim Thomlinson "samlyon" wrote: I am trying to delete a column in all worksheets. The code i'm using only deletes the column in the first worksheet, but not the rest of them. Dim sht As Worksheet For Each sht In ThisWorkbook.Worksheets Columns("D:D").Select Selection.Delete Shift:=xlToLeft Next sht Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
making copied cells change with change in original cell | Excel Worksheet Functions | |||
Making changes to most worksheets? | Excel Programming | |||
Making worksheets | Excel Programming | |||
making new worksheets | Excel Programming | |||
Programatically making worksheets | Excel Programming |