This is an embedded spreadsheet. From the main form, the click-event of a button is meant to:
1. Initialize a new form.
2. Initialize a new activeX spreadsheet of type :spread = New AxOWC11.AxSpreadsheet
3. Add the spreadsheet control to the newform.
4. Resize and locate spreadsheet control.
5. Fill out cells with information stored in a two-dimensional array.
6. Then show the form containing the spreadsheet control modally.
Is this an AX Host thing? Initialization? OCXstate?
As I stated, I can resize and do some basic work with no problem, but any cell manipulation throws the 'invalid state' exception.
Furthermore, I tried to go ahead and create the spreadsheet control at design time and then went into its code in the 'Windows Form Designer' to see how the control creation was accomplished. I then tried to insert one line adding another worksheet and giving it a name. This addition caused the same exception to be thrown when I attempted to run the alteration with the debugger.
Any insight would be greatly aprreciated.
|