By using vba.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 671 - GetActivePPT - Function to return a reference to the Active powerpoint



Function GetActivePPT() As Object
'set a VBE reference to Microsoft Powerpoint Object Library
'To call
'  ---> Dim ppt As PowerPoint.Application
'  ---> Set ppt = GetActivePPT
''''''''''''''''''''''''''''''''
Dim PPApp as PowerPoint.Application
On Error Resume Next
'Reference existing instance of powerpoint
Set PPApp = GetObject(,"PowerPoint.Application")
If PPApp Is Nothing Then
    Set PPApp = New PowerPoint.Application
End if
PPApp.Visible = True
'Reference Active Presentation
Set GetActivePPT = PPApp

End Function


   Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit