I am working on a personal powerpoint project and I thought it would be cool to use activex in the powerpoint to make the slides a bit more interactive. I have some activex boxes where you can set a population and an annual growth rate and the final step would be for me to plot the 5 year projection data i am getting on a line graph. I have tried it using excel based VBA but most solutions seem to require pulling data from a sheet so won't work in powerpoint.
I have also tried the following code to build a chart skipping the need for a worksheet but to no avail as I get a runtime error 424: Object required error:
Sub AddChart()
Dim cht As Chart
Dim ser As Series
Set cht = Charts.Add
cht.ChartType = xlColumnClustered
Set ser = cht.SeriesCollection.NewSeries
ser.XValues = Array(1, 3, 5, 7, 9)
ser.Values = Array(2.4, 3.2, 5.7, 12.67)
End Sub
Any solutions in mind or am I flogging a dead horse here?
Thanks!