VBA Events in PowerPoint

2

Hello,

Exit some Powerpoint event that allows you to run a subroutine by selecting a slide.

For example, the presentation is running ... When you get to slide 120 it has to execute a routine or a macro without any user action or button.

I looked for something like: slide120_Open () and slide120_Iniciallize () but I did not succeed in either.

    
asked by anonymous 11.01.2018 / 12:08

1 answer

1

Event

To trigger some programming when the Powerpoint Slide hits / arrives on a certain page during the presentation, the OnSlideShowPageChange event can be used.

The code will be called before entering the Slide during the transition.

For example, the code will be called in Slide 3: Slide 2 -> Transição -> Slide 3 .

Code

Public Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow)
   'O Slide 3 é selecionado
   If Wn.View.CurrentShowPosition = 3 Then
       'Créditos https://stackoverflow.com/a/3205576/7690982
       'Inserir o código aqui.
       MsgBox "Teste: O código foi acionado."
   EndIf
End Sub
    
15.01.2018 / 18:20