title: Active X error 429 cannot create an object , when I try to run the below macro
body: <p>So, I am trying to create a macro which will copy data from an excel sheet (in this case sheet "Regions") and then copy paste in an existing powerpoint template, slide no 4.</p>
  
  <p>Please note the powerpoint and excel file both are saved in a dropbox folder. (if that changes anything)
  I am not an expert in VBA so cannot understand why it is showing me this error.</p>
  
  <p>The code is below:</p>
  
  <pre><code>Sub excelrangetopowerpoint()
  
  Dim rng As Range
  Dim powerpointapp As Object
  Dim mypresentation As Object
  Dim destinationPPT As String
  Dim myshape As Object
  Dim myslide As Object
  
  Set rng = Worksheets("regions").Range("B1:N18")
  
  On Error Resume Next
  
  Set powerpointapp = CreateObject("powerpoint.application")
  detinationppt = ("C:\Users\OLX-Admin\Dropbox (Corporate Finance)\Naspers Monthly Reporting\Prep for call\From teams\FY2019\OLX Group Monthly Report_Sep'18_Macro.pptx")
  PowerPoint.Presentations.Open (destinationPPT)
  
  On Error GoTo 0
  
  Application.ScreenUpdating = False
  
  Set mypresentation = PowerPoint.ActivePresentation
  Set myslide = mypresentation.Slides(4)
  
  rng.Copy
  
  myslide.Shapes.PasteSpecial DataType:=2 '2 = enhanced metafile
  Set myshape = myslide.Shapes(myslide.Shapes.Count)
  
  myshape.Left = 152
  myshape.Top = 152
  
  powerpointapp.Visible = True
  powerpointapp.Activate
  
  Application.CutCopyMode = False
  
  End Sub
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3ak0D.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ak0D.jpg" alt="enter image description here"></a></p>