mss72
asked on
Excel 2003 VBA How do I make TickLabelSpacing automatic?
I am using Excel 2003 and wish to make the spacing of the category labels on the Category (x) axis automatic, using VBA. Using TickLabelSpacing requires a number between 1 and 31999 and does not accommodate xlAutomatic.
There is no option for automatic. The closest thing to it is to not specify a value and let Excel default to a value.
ASKER
The problem is that Excel normally does set the TickLabelSpacing automatically in a new chart but once the spacing is set to a specific value you cannot return to the automatic mode. Setting TickLabelSpacing to Null seems to have no effect. Setting the value to 0, Empty, Nothing or "" throws an Error.
I don't think there's an option (in later versions there is a TickLabelSpacingIsAuto property), but I'll do some testing.
ASKER
I am still unclear why a new chart in Excel 2003 does have automatic TickLabelSpacing and yet once a value is supplied you cannot return to automatic
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The problem remains because of the design of EXCEL. This is not the fault of the person answering the question