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.
Microsoft Excel
Last Comment
mss72
8/22/2022 - Mon
Rory Archibald
There is no option for automatic. The closest thing to it is to not specify a value and let Excel default to a value.
mss72
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.
Rory Archibald
I don't think there's an option (in later versions there is a TickLabelSpacingIsAuto property), but I'll do some testing.