OWC11 Chartspace and InternalPivotTable

  • Thread starter Patrick McElreavy
  • Start date
P

Patrick McElreavy

Hi,

I'm upgrading an OWC10 project to OWC11. For now, everything seems to
be fine except that I'have got this problem -- I cannot get to type
OWC11 chart's InternalPivotTable correctly.

I have this code:
Dim objChartSpace As AxOWC11.AxChartSpace
Dim objChartPivot As AxOWC11.AxPivotTable
[...]
objChartPivot = CType(objChartSpace.InternalPivotTable,
AxOWC11.AxPivotTable)

With OWC10 it works perfectly but in OWC11 I get a "Specified cast is
not valid" error.

The project is written in VB.NET in Visual Studio.NET 2003 using the
Microsoft.NET Framwork 1.1.

Can anyone help?
 
P

Patrick McElreavy

I found my problem. I have done a "mass replace" to change the
references of OWC10 to OWC11 and the code has broke.

The code below is correct:
Dim objChartSpace As AxOWC11.AxChartSpace
Dim objChartPivot As OWC11.PivotTable
[...]
objChartPivot = CType(objChartSpace.InternalPivotTable,
OWC11.PivotTable)

Patrick
 
Top