Axes(xlCategory).CategoryNames

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to assign labels to the tickmarks on a chart in an Excel module.
I have the following code:

label = "all the same"
For Each tick In chtObj.Chart.Axes(xlCategory).CategoryNames
tick = label
Next

I am getting an error because of a type mismatch. It appears that
chtObj.Chart.Axes(xlCategory).CategoryNames is typed as "Variant/Double".

Can anyone help?
 
Thanks for the help. I found syntax that works.
(example)
chtObj.Chart.Axes(xlCategory).CategoryNames = Range("A1:Z1")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top