Link to home
Start Free TrialLog in
Avatar of Ed Matsuoka
Ed MatsuokaFlag for United States of America

asked on

Powerpoint Chart labels

Hi Experts!

I did a search and didn't find exactly what I need so I thought I'd ask. I THINK this is an easy question to answer but ofc you will be the ones to know. I have 100 Powerpoint slides, most but not all of which contain a single bar chart named MY_CHART. I want to use VBA and loop through all of these and change every chart so that the data label value of the bars is turned on (i.e., a bar with 40% will display 40% above the bar). How do I do this?

Thanks!
Avatar of PrisonBroken
PrisonBroken
Flag of United Kingdom of Great Britain and Northern Ireland image

Something like

   For Each sld In ActivePresentation.Slides
        sld.Shapes("MY_CHART").Select
       
        For Each Series In ActiveChart.SeriesCollection
            DataLabels.ShowValue = True
        Next
       
        Next
Avatar of Ed Matsuoka

ASKER

Hi Prison!

Here is an example file I created. I tried your macro and got an error message. What am I missing?

Ed Matsuoka
No file attached
Sorry, I see you have to click the ATTACH button, not just choose the file.
Example.ppt
Hi Eddie,

This seems a bit old school for me to help with to be honest. There does not appear to be a chart within that shape object which is why the code to turn on datalabels for each series had no chance

User generated image
Think you need someone else on this one as I do not have the time

Sorry.
No problem! Hope someone else can help.
Thanks! I hope they can help.
ASKER CERTIFIED SOLUTION
Avatar of PrisonBroken
PrisonBroken
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That works perfectly. Thanks a lot!