1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Sub PopUp1_1_apparaitre()
If PresenceShape(ActivePresentation.Slides(1), "PopUp1_1", "PopUp1_2") = True Then
With ActivePresentation.Slides(1)
If .Shapes("PopUp1_1").Visible = msoFalse Then .Shapes("PopUp1_1").Visible = msoTrue
If .Shapes("PopUp1_2").Visible = msoTrue Then .Shapes("PopUp1_2").Visible = msoFalse
End With
Else
MsgBox "Absence PopUp !", vbCritical
End If
End Sub
Sub PopUp1_2_apparaitre()
If PresenceShape(ActivePresentation.Slides(1), "PopUp1_1", "PopUp1_2") = True Then
With ActivePresentation.Slides(1)
If .Shapes("PopUp1_2").Visible = msoFalse Then .Shapes("PopUp1_2").Visible = msoTrue
If .Shapes("PopUp1_1").Visible = msoTrue Then .Shapes("PopUp1_1").Visible = msoFalse
End With
Else
MsgBox "Absence PopUp !", vbCritical
End If
End Sub
Function PresenceShape(ByVal SlideEnCours As Slide, ByVal NomShape1 As String, ByVal NomShape2 As String) As Boolean
Dim I As Integer
Dim NbShapesPresents As Integer
PresenceShape = False
NbShapesPresents = 0
With SlideEnCours
If .Shapes.Count = 0 Then Exit Function
For I = 1 To .Shapes.Count
If .Shapes(I).Name = NomShape1 Then NbShapesPresents = NbShapesPresents + 1
If .Shapes(I).Name = NomShape2 Then NbShapesPresents = NbShapesPresents + 1
Next I
If NbShapesPresents = 2 Then PresenceShape = True
End With
End Function |
Partager