OWC10.ChartSpace - How to programmatically change AutoCalc properties of Series from Sum to Average

P

Primoz Orehar

Hi!



In an MS Access form I am trying to represent data in chart object (OWC10)
with different series.

Everything works fine but I can't change default AutoCalc property from Sum
to Average. It's possible and works in runtime with right click on the
series AutoCalc a Average, but I want to do this in code because I'd like to
prevent user to change this property in runtime. I found an example which
work with different property like (chCommandShowDropZones) but they don't
work with chCommandAverage.



Dim ssConstants

Dim ChartSpace1 As OWC10.ChartSpace



Set ssConstants = CSpace.Constants



If (CSpace.Commands(ssConstants.chCommandShowDropZones).Checked = True) Then

CSpace.Commands(ssConstants.chCommandShowDropZones).Execute

End If



If I change the line
CSpace.Commands(ssConstants.chCommandShowDropZones).Execute with

CSpace.Commands(ssConstants.chCommandAverage).Execute the computer return
error: "Application-defined or object-defined error".



Hoping some of you can help me...
Many thanks in advance, you saved my day few times
already!!!



Primoz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top