View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tdeve tdeve is offline
external usenet poster
 
Posts: 1
Default set Excel.Axis properties

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.xlCategor y,

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