ActiveX spreadsheet control state problems

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
I'm using the AxMicrosoft.Office.Interop.Owc11.AxSpreadsheet control within my application. If I add the control to a form using the designer I can use it without any problems and all is well. Now, the problem is I want to dynamically generate these controls from within my code as I need them.

I can generate the control and display it but as soon as I want to access a particular property it gets upset and throws an InvalidActiveXStateException. These properties are lank important and I make use of them often but I don't understand how to put the spreadsheet control in the right state for me to change these properties. I don't really know all that much about ActiveX either.

Has anyone had this problem before or do you know how to get around it? This is a nightmare!
 
Back
Top