Reputation: 4950
I'm trying to read and set Excel cells values with Cells(1,1)
. I was successful with reading this value. But I've seen code with Cells(1,1).Value()
. So when should I use the notation itself: Cells(1,1)
and notation with .Value()
(Text()/Value2())
?
Upvotes: 0
Views: 110
Reputation: 5243
The default property of Cells
in VBA is Value
. There's no difference in using it vs not using it.
I prefer to explicitly define the Value
property though for the sake of debugging and helping others who may read my code in future as it is a clear indication of what the code is trying to achieve.
Upvotes: 1