View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default How to get individual range objects from a set of range objects?

dim myrange as range, cell as range

set myRange = Worksheets("Sheet1").Range("B15:B17")
for each cell in MyRange
msgbox cell.Address
Next

'to refer to the 2nd cell in the range
msgbox myRange(2)

--
Regards,
Tom Ogilvy


"Dev" wrote:

I set up myRange to contigious cells - now how do I get individual range
objects from it?
Ex: I set myRange = Worksheets("Sheet1").Range("B15:B17") - now I want to
get B15, B16; B17. Is there any way to get this using Excel OM?

Thanks for any suggestion!