Syntax

expression.CategoryNames

expression A variable that represents an Axis object.

Remarks

This property applies only to category axes.

Example

This example sets the category names for Chart1 to the values in cells B1:B5 on Sheet1.

Visual Basic for Applications
Set Charts("Chart1").Axes(xlCategory).CategoryNames = _ Worksheets("Sheet1").Range("B1:B5")

This example uses an array to set individual category names for Chart1.

Visual Basic for Applications
Charts("Chart1").Axes(xlCategory).CategoryNames = _ Array ("1985", "1986", "1987", "1988", "1989")
category names Category Names Property CategoryNames CategoryNames Property Change category names for series? Return all category names for specified axis? Set new names for categories?

See also: