deleting a variable number of columns

  • Thread starter Thread starter Rob Barnard
  • Start date Start date
R

Rob Barnard

Hi Phillip,

You might like to try something like:

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

:-)

Rob
 
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

Back
Top