Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a collection of ranges
What I would like to do is:
For Each r in rColl Hi. Just throwing this out. Is the "Areas" the property you were looking for? Sub Demo() Dim RngColl As Range Dim r As Range Set RngColl = Range("A1:D1, E40:R40, T120:AA120") For Each r In RngColl.Areas r.Select 'or Clear, or whatever... Next End Sub -- Dana DeLouis Windows XP & Office 2003 "Gary''s Student" wrote in message ... What is the syntax to create a collection of ranges? Currently I use an array of strings: Sub dural() s = Array("A1:D1", "E40:R40", "T120:AA120") For i = LBound(s) To UBound(s) Range(s(i)).Clear Next End Sub What I would like to do is: rColl = whatever dim r as Range For Each r in rColl r.Clear Next -- Gary''s Student |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a collection of ranges | Excel Programming | |||
Getting a collection of named ranges using wildcard characters? | Excel Programming | |||
Alternitive to Collection of Ranges | Excel Programming | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming |