altering a graph during a slide show - please help!

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

i'm kinda under the gun w/ this one. i'm not too familiar w/ VB, though
i've tinkered w/ it from time to time. the problem i'm trying to resolve
involves code found under MS knowledge base. now, the following code, as i
understand it, is supp to the values of a graph (namely a1:d4) by 5, during
a powerpoint presentation. however, when i run it, it doesn't recognize the
declarations graph.chart and graph.range. again, this is powerpoint 2000.
help!

Sub ModifyValueUp()
Dim ograph As Graph.Chart
Dim oRange As Graph.Range

' Assign ograph to the graph object.
'
Set ograph =
ActivePresentation.Slides(1).Shapes("Graph1").OLEFormat.Object

With ograph.Application.DataSheet

' Loop through each object and increase
' the value of each cell by 5.
'
For Each oRange In .Range("a1:d4")
oRange.Value = oRange.Value + 5
Next oRange
End With
Set ograph = Nothing
End Sub

thanks!
 
Back
Top