ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   set Excel.Axis properties (https://www.excelbanter.com/excel-programming/377959-set-excel-axis-properties.html)

tdeve

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





All times are GMT +1. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com