• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Set a custom data range in powerpoint

Dear all,

I have the following powerpoint (see attachment). Running the following code gives me a single bar chart.

Code:
Sub function_line_title()

 Set myChart = ActivePresentation.Slides(1).Shapes(1).Chart

 With myChart
 .HasTitle = False
 .SeriesCollection(1).Delete
 .SeriesCollection(1).Delete
 .HasAxis(xlCategory) = False
 .HasAxis(xlValue) = False
 .Axes(xlValue).MajorGridlines.Delete
 .HasLegend = False
 '.SetSourceData Source:= 1,2


 End With

End Sub

All fine but now the last thing I want to do is to set a custom data source. If you run this now you'll see the values will be 2,2,3,5.

Any thoughts on how i can change this to custom value, df 4,3,3,8
 

Attachments

  • Presentatie1.zip
    42.2 KB · Views: 1
Back
Top