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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top