user2472368
user2472368

Reputation: 199

Axis label in Excel

This code:

With ActiveChart.Axes(xlCategory, xlPrimary)
    .HasTitle = True
    .AxisTitle.Characters.Text = "Issues"
End With

It adds the label to the X axis, but it also preserves the old. I want to change or remove the old label to this one. Now I have two labels/titles below the x axis.

Upvotes: 1

Views: 955

Answers (1)

R3uK
R3uK

Reputation: 14547

If you want to delete the old axis title first, try this :

With ActiveChart.Axes(xlCategory, xlPrimary)
    .AxisTitle.Delete
    .HasTitle = True
    .AxisTitle.Characters.Text = "Issues"
End With

Upvotes: 1

Related Questions