VBA Code to change font color and style in ActiveChart.Axes(xlValue)

I recorded a simple macro to do just that but when I run it, it throws an error on to the second line : "Method 'TextFrame2' of object 'ChartFormat' failed"
ActiveChart.Axes(xlValue).Select
With Selection.Format.TextFrame2.TextRange.Font
  .Fill.ForeColor.RGB = RGB(0, 0, 0)
  .Bold = True
End With

Open in new window

How should it be written?

Also, how should I write it so that it will perform the same operation on all the charts on the sheet. There are numerous other shapes on the sheet.
LVL 1
John CarneyReliability Business Tools Analyst IIAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try

For Each chtobj In ActiveSheet.ChartObjects
    With chtobj.Chart.Axes(xlValue).TickLabels.Font
         .Bold = msoTrue
         .Color = RGB(0, 0, 0)
     End With

Next

Open in new window

Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John CarneyReliability Business Tools Analyst IIAuthor Commented:
Perfect! Thanks, Rgonzo.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.