Reputation: 59
Some Excel VBA code I've seen does not used the .Value property on the Range object, for example:
myX = Range("A1")
rather than
myX = Range("A1").Value
Is this just because the default behavior of the range object is to return the value in the cell? Is there ever a time when I would not want to use this property to access the numerical value in a cell?
Upvotes: 3
Views: 485
Reputation: 53135
Value is the default property of Range. So any code that expects a property and refers to a Range alone, will get Value.
There are other properties that will return a range's "value" such as Value2, Text, and sometimes Formula* which have their specific uses.
Upvotes: 3