View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default VBA to select multiple columns

Hi Marvin,

Dim Rng as range
set Rng = ActiveCell.EntireColumn.Resize(, 3)

It is rarely necessary to make selections, but if you do:

ActiveCell.EntireColumn.Resize(, 3).Select

---
Regards,
Norman



"Marvin" wrote in message
...
I can use a statement like:

rows("3:5").select

I can use a statement like:

columns(3).select

but

columns("3:5").select

fails.

My objective is to select a number of columns based on a
cell value, starting with the current column.
Is it necessary for me to calculate the column "letters"
or is there a simpler way?

Thanks.