ColorSchemeChanged Event
TOC
Collapse the table of content
Expand the table of content

Application.ColorSchemeChanged Event (PowerPoint)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Occurs after a color scheme is changed.

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.

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.

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


Show:
© 2016 Microsoft