Export (0) Print
Expand All

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.

Parameters

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


Show:
© 2014 Microsoft