ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Primary Axis Position (https://www.excelbanter.com/excel-programming/433208-primary-axis-position.html)

George Lee

Primary Axis Position
 
I hate asking such as referenial question, but I can't find this online: How
do you set the Position Axis through VB/VBA?

That is, in the Format Axis dialog (right click a chart X axis and select
Format Axis...) there is an option to "Position Axis" as either "On tick
marks" or "Between tick marks". How can this be set programmatically? No, the
macro recorder does this record this.

Andy Pope

Primary Axis Position
 
Hi,

Try,

ActiveChart.Axes(xlCategory).AxisBetweenCategories = False

Cheers
Andy

George Lee wrote:
I hate asking such as referenial question, but I can't find this online: How
do you set the Position Axis through VB/VBA?

That is, in the Format Axis dialog (right click a chart X axis and select
Format Axis...) there is an option to "Position Axis" as either "On tick
marks" or "Between tick marks". How can this be set programmatically? No, the
macro recorder does this record this.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 04:52 AM.

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