deleting a variable number of columns

R

Rob Barnard

Hi Phillip,

You might like to try something like:

ActiveSheet.Range(Cells(1,1),Cells
(1,delCol)).EntireColumn.Delete

:)

Rob
 
S

steve

Phillip,

You can also use the following notation (just another way)

ActiveSheet.Range(Columns(1st column #),Columns(last column #)).Delete

this notation just makes it clearer that you are working on columns.

steve
 
Top