mjohnston0209
Board Regular
- Joined
- Nov 6, 2017
- Messages
- 55
I am trying to design a macro that will open up an existing PPT, delete all objects on a specific slide, and then copy updated objects from excel to the now blank slide. I have found several videos that are very helpful. However, I am running into a simple problem. I keep getting an "ActiveX component can't create object" error with defining the slide number. Below is the code that works perfectly in the sample video I saw. Would anyone know why I keep getting this error? I have one PPT open, and the file was selected before entering the VBA Editor to run the macro.
VBA Code:
Sub SelectSlides()
'Declare the variables
Dim PPTSlide As Slide
'Create a reference to the slide we want to work with
Set PPTSlide = ActivePresentation.Slides(2)
End Sub
Last edited by a moderator: