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