View Single Post
  #15   Report Post  
Posted to microsoft.public.vstudio.general,microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.general,microsoft.public.office.misc,microsoft.public.excel.programming
Steve Rindsberg Steve Rindsberg is offline
external usenet poster
 
Posts: 27
Default How do I access different versions of Excel from one .NET executable?

In article , John Brock wrote:
Very interesting!!! I knew about reflection and late binding, but
it didn't occur to me that they could be used for this. (I assume
this method will work just as well for VB.NET as for C#)?


It does for VB and VBA. Unless they've crippled VB.NET for some obscure
reason, it should work.

Yes, coding would be ugly. I would especially miss Intellisense.


Again, I don't know how you'd do it in .Netspeak but in VB/VBA, you can:

Dim oSlide as PowerPoint.Slide
'Dim oSlide as Object

Write your code using Intellisense, then when it's all working, move the
apostrophes around in your declaration so you have:

'Dim oSlide as PowerPoint.Slide
Dim oSlide as Object

Instant late-binding w/o the Ugly.