My question is whether it is possible to write VBA code in PowerPoint to cause a pie chart to cycle through several years of data. I have done it in Excel with a button, but cannot find a way to either copy that button and chart
or create the same effect in my presentation. If I copy the chart from Excel to PPT, I can control it from Excel, but not while in presentation mode.
Below is the code I used in Excel:
Private Sub CommandButton1_Click()
Dim PauseTime, Start
Dim i As Integer
i = 1
Do While i <= 8
Sheet13.Cells.Range("B1").Value = i <----- I know this will not work in my PPT file.
i = i + 1
PauseTime = 0.6 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime ' Start + PauseTime
DoEvents ' Yield to other processes.
Loop
Loop
End Sub
I've also inserted a scroll bar for more manual manipulation. I would very much appreciate any and all help with this!
Thanks
Liz