Why do I still need to cast "Range selected = (Range) app.Selection;" ???

M

mattiasw

I have an VBA xla that I remade to VB6-com addin 3 years ago. Now I
thought it was time to update it. I installed VS2008, latest VSTO and
the latest VSTO powertoys.

I was hoping that at last I would be able to do TYPED programming for
Excel, i.e. instead of

Range selected = (Range) app.Selection; "

I write

Range selected = app.Selection; "

Is this still a dream? Or what have I missed?

In VB6 and VBA is still better than VSTO, since in the former I can at
least se the type of the type of the object in the watch-window. In
VS2008, all I get is that it is a proxy.

Should I wait for Excel 2009 until looking into this?

-- Mattias
 
Top