Hi,
I am struggling with updating my power point charts with data from excel ranges. I am working on power point 2007. Below is my code. I am getting an error at set objdatasheet line saying object does not support this property or method. Any help would be appreciated. Also this is the firsttime I am posting this kind of question, hence please excuse if i break any forum.
Public Sub DTMB()
Set pptApp = CreateObject("PowerPoint.Application")
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Presentations(1).Slides(pptApp.ActivePresentation.Slides.Count).Select
pptApp.ActiveWindow.ViewType = ppViewSlideSorter
pptApp.ActiveWindow.View.Paste
pptApp.ActiveWindow.ViewType = ppViewNormal
pptApp.Presentations(1).Slides(pptApp.ActivePresentation.Slides.Count).Select
Range("A16:F20").Select
Selection.Copy
Set pptprs = pptApp.ActivePresentation
Set objGraph = pptprs.Slides(pptApp.ActivePresentation.Slides.Count).Shapes("Object 1").OLEFormat.Object.Application
' pointer to graphs data sheet
Set objdatasheet = objGraph.Datasheet
objdatasheet.Range("00").Paste
Application.CutCopyMode = False
End Sub
Bookmarks