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())
?
Asked
Active
Viewed 103 times
0
1 Answers
1
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.

Gareth
- 5,140
- 5
- 42
- 73
-
2This holds especially true if you're also handling `Range` variables in your code, as you won't be confused if you, for example, are also copying Ranges. For more infos on .Text/.Value/.Value2 see [this SO link](http://stackoverflow.com/a/17363466/4600127). – Verzweifler Jun 03 '15 at 13:11