Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.ColorSchemeChanged Event (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Occurs after a color scheme is changed.

Syntax

expression. ColorSchemeChanged( SldRange )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
SldRangeRequiredSlideRangeThe 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, seeHow 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

Concepts

Application Object

© 2018 Microsoft