View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Refer to Ranges using Cells notation

with activesheet
set rng = range(.cells(1,1),.cells(100,1))
'or
set rng = .cells(1,1).resize(100,1)
end with

Tim

"Scott P" wrote in message
...
Hi,

I am trying to pass through a worksheet using VBA with a nested For
loop and
would like to refer to the cells that I pass through using the
Cells(row,
col) notation. Is there a way to refer to a range of cells (e.g.
A1:A100)
using the Cells(row, col) notation instead of having to use the
Range
notation?

Thanks in advance.