Application.WindowSelectionChange event (PowerPoint)

Occurs when the selection of text, a shape, or a slide in the active document window changes, whether in the user interface or in code.


expression. WindowSelectionChange( _Sel_ )

expression A variable that represents an Application object.


Name Required/Optional Data type Description
Sel Required Selection Represents the object selected.


This example determines when a different slide is being selected and changes the background color of the newly selected slide.

Private Sub App_WindowSelectionChange(ByVal Sel As Selection)

    With Sel
        If .Type = ppSelectionNone Then
            With .SlideRange(1)
                .ColorScheme.Colors(ppBackground).RGB = _
                    RGB(240, 115, 100)
            End With
        End If
    End With

End Sub

See also

Application Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.