I put your code in a command button, changed one of your DIM statements (removed withEvents), changed your 'TRUE' option to false, and it works just fine.....try this in a commandbtn (changed the path/filename to YOURS)/
Code:
Dim oPPTAppEvents As PowerPoint.Application 'I REMOVED "WITHEVENTS"
Dim oPPTApp As PowerPoint.Application
Dim oPPTPres As PowerPoint.Presentation
Dim PresPath As String
Set oPPTApp = CreateObject("PowerPoint.Application")
PresPath = App.Path & "\test.ppsx" 'CHANGE THIS TO THE PATH AND FILENAME OF YOUR PPT PRESENTATION
If Not oPPTApp Is Nothing Then
Set oPPTAppEvents = New PowerPoint.Application
' List1.AddItem "All slide show events are being monitored..." 'I COMMENTED OUT THIS, AND NEXT LINE, AS I DONT HAVE THESE CONTROLS ON MY FORM...YOU CAN LEAVE THEM UNCOMMENTED
' Txt_Data(4).Text = Format(Now(), "dd-mmm-yy hh:mm:ss")
With oPPTApp
Set oPPTPres = .Presentations.Open(PresPath, , , False) 'I CHANGED TRUE TO FALSE (LIKE YOU ORIG HAD-NEXT LINE)
'Set oPPTPres = .Presentations.Open(PresPath, , , False)
If Not oPPTPres Is Nothing Then
oPPTPres.SlideShowSettings.Run
Else
MsgBox "The code could not open the specified file." & _
"Check if the file is present at the location.", _
vbCritical + vbOKOnly, "PowerPoint Automation Example"
End If
End With
Else
MsgBox "The code failed to instantiate PowerPoint session.", _
vbCritical + vbOKOnly, "PowerPoint Automation Example"
End If