View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default When do you need .Value?

The way I rationalize it is to think of Range Objects as Collection
Objects, but to recognize that a Range Object is a collection of more
items than just those specified in the explicitly stated range. I.e.,
Range("D20:H30") [or any other explicit range] is a collection of all
cells on the worksheet, not just the 55 cells explicitly stated; and to
recognize that the indexing starts with the upper left cell of the
explicitly stated range as Item(1,1). And Range("D20:H30").Rows acts as
a collection of the rows D:H on the worksheet, with
Range("D20:H30").Rows.Item(1) being the first row of the explicitly
stated range, i.e., D20:H20; and similarly for a range collection of
columns.

This mental construct breaks down for single indexing of ranges that are
collections of cells. In this case the ranges act like collections of
cells in an idiosyncratic range that I'll be happy to describe if
anybody's interested.

Alan Beban

Dick Kusleika wrote:

Had a hard time finding this...

Default Property/Methods for Objects in Visual Basic
http://support.microsoft.com/default...57&Product=xlw



Hmmm. Now I'm confused. Maybe since Range is an atypical object (both an
object and a collection) the Value and Item are both default properties (the
help you quoted notwithstanding). And the existence of arguments determines
which one is used.

But then the Item property for Range doesn't work like other Item
properties. You can't get a subscript error with Range.Item like most
(all?) other collections. It's probably just incorrect of me to think of
Range as a collection.