Posted to microsoft.public.excel.programming
|
|
When do you need .Value?
Dim x as Variant
Just to nit pick, NET doesn't support Variants, either.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Tushar Mehta" wrote in
message news:MPG.1b102c4883d528ef9897bb@news-server...
Just that, Alan. The software will not make an inference about
what
property it should refer to. So,
Dim x as Integer
x=Cells(1,1)
will not be interpreted as
x=Cells(1,1).Value
but an attempt to assign an object, i.e., Cells(1,1), to an
integer
variable (x).
After all, .Net doesn't require a Set to assign an object to a
variable. So, if it supported a default property concept, the
following would be ambiguous:
Dim x as Variant
x=Cells(1,1)
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article ,
says...
Hi Tushar,
Can you give an illustration of what's meant by "VB.Net does
not support
a default property"?
Thanks,
Alan Beban
Tushar Mehta wrote:
. . . More importantly, AFAIK, VB.Net does not support a
default property.
Why not do it right now so that if/when you port the code,
a missing
default property doesn't have to be the cause of problems.
|