set Excel.Axis properties

T

tdeve

I am trying to manipulate a chart's secondary axis group to be as follows:

In excel there is a checkbox under "Chart Options" for the "Axes" tab. I
want to programatically check the "Category (X) axis" and set the Category
Type to "Time-scale".

I have figured out how to obtain an instance of the secondary Axis (show
below):

Excel.Axis axis = (Excel.Axis)oChart.Axes(Excel.XlAxisType.xlCategory,

Excel.XlAxisGroup.xlSecondary);

I cannot figure out how to set that checkbox via this object and when I try
to set the Category type using the following code:

axis.CategoryType = Excel.XlCategoryType.xlTimeScale;

It actually sets the CategoryType to xlCategoryScale, not xlTimeScale
(weird). I would GREATLY appreciate any insight that you may have to offer.

Sincerely,

tdeve
 

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