M
Mark
I have a C# add in that inserts a custom active x control
into a worksheet.
Once the object is inserted i can locate the object
through both Shapes and Worksheet.OLEObjects. What I
can't do is figure out how to use the object
programatically.
I added a reference to the object in the Visual Studio
project by importing the object OCX. The reference shows
up as Interop.ActiveXLib and my objects methods and
properties are shown in the object browser under both
interop.ActiveXLib.ImyControl and
interop.ActiveXLib.ImyControlCtlClass.
I have tried various arrangements of casting the object
returned from both Shapes and Worksheet's OLEFormat.Object
trying to get something that I can use directly with no
success:
ActiveXLib.myControlCtlClass mc =
(ActiveXLib.myControlCtlClass) shape.OLEFormat.Object;
I am writting the add in Visual Studio .Net and it is
running in Excel 2002 Service Pack 1.
What I want to do is to be able to use:
mc.myControlMethod(doIT).
Thanks for the help
Mark
into a worksheet.
Once the object is inserted i can locate the object
through both Shapes and Worksheet.OLEObjects. What I
can't do is figure out how to use the object
programatically.
I added a reference to the object in the Visual Studio
project by importing the object OCX. The reference shows
up as Interop.ActiveXLib and my objects methods and
properties are shown in the object browser under both
interop.ActiveXLib.ImyControl and
interop.ActiveXLib.ImyControlCtlClass.
I have tried various arrangements of casting the object
returned from both Shapes and Worksheet's OLEFormat.Object
trying to get something that I can use directly with no
success:
ActiveXLib.myControlCtlClass mc =
(ActiveXLib.myControlCtlClass) shape.OLEFormat.Object;
I am writting the add in Visual Studio .Net and it is
running in Excel 2002 Service Pack 1.
What I want to do is to be able to use:
mc.myControlMethod(doIT).
Thanks for the help
Mark