Application.ColorSchemeChanged event (PowerPoint)

Occurs after a color scheme is changed.

Syntax

expression. ColorSchemeChanged( _SldRange_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
SldRange Required SlideRange The range of slides affected by the change.

Remarks

Actions which trigger this event would include actions such as modifying a slide's or slide master's color scheme, or applying a template.

To access the Application events, declare an Application variable in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

Example

This example displays a message when the color scheme for the selected slide or slides is changed. This example assumes an Application object called PPTApp has been declared by using the WithEvents keyword.

Private Sub PPTApp_ColorSchemeChanged(ByVal SldRange As SlideRange)



    If SldRange.Count = 1 Then

        MsgBox "You've changed the color scheme for " _
            & SldRange.Name & "."

    Else

        MsgBox "You've changed the color scheme for " _
            & SldRange.Count & " slides."

    End If

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.