Share via


Effect.MoveBefore Method

PowerPoint Developer Reference

Moves one animation effect to before another animation effect.

Syntax

expression.MoveBefore(Effect)

expression   A variable that represents an Effect object.

Example

The following example moves one effect in front of another one.

Visual Basic for Applications
  Sub MoveEffect()
    Dim effOne As Effect
    Dim effTwo As Effect
    Dim shpFirst As Shape
Set shpFirst = ActivePresentation.Slides(1).Shapes(1)
Set effOne = ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect _
    (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)
Set effTwo = ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect _
    (Shape:=shpFirst, effectId:=msoAnimEffectBlast)

effTwo.<strong>MoveBefore</strong> Effect:=effOne

End Sub

See Also