Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a collection of ranges Norman Jones Excel Programming 0 January 3rd 07 07:58 PM
Getting a collection of named ranges using wildcard characters? Randy Harmelink Excel Programming 2 November 7th 06 02:04 AM
Alternitive to Collection of Ranges Abode Excel Programming 1 May 4th 06 04:45 PM
Retrieving the Collection of Ranges in a Workbook K Dales[_2_] Excel Programming 0 January 19th 05 09:16 PM
Retrieving the Collection of Ranges in a Workbook K Dales[_2_] Excel Programming 0 January 19th 05 09:16 PM


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"