Marlon,
Well, yes. Use VB and turn option strict off. This is exactly how I
would handle this particular situation, since using reflection in C# to do
it is a PITA.
Create an assembly in VB that exposes your functionality (which performs
the work of accessing Excel) and then reference that from your project.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Marlon R" <ya********@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is there a way to access COM object like VB.NET when Option Strict is set
to Off.
I am write an application that will interop with Excel. But the target
machines all have different version (9,10,11) .
Option Strict Off
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim o As Object = GetObject("")
o.GetName()
End Sub
End Class