View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
SunTzuComm SunTzuComm is offline
external usenet poster
 
Posts: 30
Default When do you need .Value?

Dick,

I didn't expect to trigger a discussion of semantics. I was thinking of OOP in
general: Anything that has a property is an object, even if that thing is
itself a property of another object. If the Cells property returns a Range
object whose default property is Value, then Cells is as good as an object
whose default property is also Value. If that's not the terminology Excel's
object model uses, I apologize profusely.

Omitting the default property MAY be more efficient because parsing is
processing intensive, and a look-up is, well, just a look-up. I have no hard
evidence for this, and I'm not going to spend time testing the theory, but it
seems that whenever one can omit source code from an Excel macro, one MAY be
reducing run time. I, too, always include each default property, if only for
the sake of documentation.

Regards,
Wes