Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I modify chart data from visual basic 1

Status
Not open for further replies.

jisaacson

Programmer
Mar 21, 2005
14
US
I have a PowerPoint slide with 4 charts - 3 bar and 1 pie.
I would like to be able to dynamically modify the data in each of the charts.

I want to do this from a visual basic program.

How do I point to the tables that contain the data for the charts?

Thanks for any help you can give me.
 
Hi,

Are these embedded Excel Charts of Microsoft Graph?

Skip,

[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue]


 
Hi,

Are these embedded Excel Charts OR Microsoft Graph?

Skip,

[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue]


 
Skip,

These are Microsoft Graphs embedded in the slide. The presentation was drafted manually, using dummy data to set up the charts and text in the file. No links from Excel workbooks were used.

Joel
 
This might get you started. Set a reference to the MS Graph n.m Object Library in the VB Editor Tools/references.
Code:
Sub test()
    Dim grp As Graph.Chart
    For Each shp In ActivePresentation.Slides(1).Shapes
        With shp.OLEFormat
            If .ProgID Like "MSGraph*" Then
                Set grp = .Object
                With grp
                    For Each Cell In .Application.DataSheet.Cells
                        
                    Next
                End With
            End If
        End With
    Next
End Sub


Skip,

[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue]


 
Skip,

Your suggestion did get me started. It gave me the clue I needed to access all of the text, tables, charts, etc in an existing PowerPoint slide(s).

Thanks for your help

Joel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top