Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Receiving error message when trying to paste OLEobject into PowerPoint from Excel

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Receiving error message when trying to paste OLEobject into PowerPoint from Excel

    Hey everyone!

    I am having some issues pasting a linked excel chart into an embedded PowerPoint. I either get an error message or PowerPoint completely shuts down. Any help is appreciated! code is as follows:

    Code:
    Sub PastingChart()
    '
    ' PastingChart
    '
    Dim PPApp As PowerPoint.Application
    Dim PPPres As PowerPoint.Presentation
    Dim PPSlide As PowerPoint.Slide
    '
    Sheets("Report").Select
        ActiveSheet.Shapes("Object 34").Select
        Selection.Verb Verb:=3
        Set PPApp = GetObject(, "Powerpoint.Application")
        Set PPPres = PPApp.ActivePresentation
        PPApp.ActiveWindow.ViewType = ppViewSlide
        Worksheets("May2011_Summary").Select
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.ChartArea.Copy
        PPPres.Slides(2).Shapes.PasteSpecial ppPasteOLEObject, DisplayasIcon = False, , , , Link = True
        
    End Sub
    Last edited by cytop; June 2nd, 2011, 04:18.

  • #2
    Re: Receiving error message when trying to paste OLEobject into PowerPoint from Excel

    The same initial advice as with your other post (which, incidentally, went totally unanswered by you) is to upload anonymous/cut-down copies of your workbook and presentation...

    By the way, the proper way to close code tags is [/code] ... but thanks for trying, at least. I have edited your post to correct.

    Comment


    • #3
      Re: Receiving error message when trying to paste OLEobject into PowerPoint from Excel

      I apologize for not attaching an anonymous/cut-down copy of my workbook. However I figured the code would suffice (thank you for updating my post). It is a very large workbook and would take me hours to get it to a point where I could upload it.

      I just need to know if the code above is possible with Excel 2007. I have researched this and it looks like 2007 does not support pasting a link to the chart, in PowerPoint, via VBA.

      Comment

      Trending

      Collapse

      There are no results that meet this criteria.

      Working...
      X