Run Time error 429 for power point application

suresh ullanki

Board Regular
Joined
Apr 29, 2013
Messages
67
Hi,

I want to open power point using prompt option. however it is throwing run time error 429. It is working fine if i remove prompt. any help is appreciated.

Sub DeleteAllPictures2()
Dim ppApp As PowerPoint.Application
Dim sldTemp As slide
Dim lngTemp As Long
Dim lngCount As Long
Set ppApp = GetObject(, "Powerpoint.Application")
file_name = Application.GetOpenFilename("Microsoft PowerPoint-Files (*.pptx*), *.pptx*")
If file_name = "False" Then
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
PPT.Presentations.Open Filename:=file_name
End If
For Each sldTemp In ppApp.ActivePresentation.Slides
For lngCount = sldTemp.shapes.Count To 1 Step -1
With sldTemp.shapes(lngCount)
If .Type = msoPicture Then
.delete
End If
End With
Next
Next

End Sub
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Is it throwing this error when PowerPoint isn't already open? If so, we can error-handle that.

Code:
    On Error Resume Next
    Set PPApp = GetObject(, "Powerpoint.Application")
    On Error GoTo 0
    If PPApp Is Nothing Then
        Set PPApp = New PowerPoint.Application
    End If
 
Upvote 0
Hi Mrkown...

A Ton thanks for you. struggling since morning to fix this error. Thanks for your support

Glad this was able to resolve the issue for you. Thank you for the feedback, and have a great day!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top