Vous êtes sur la page 1sur 3

'====== Script o Código completo del Ejemplo (Copiarlo y sustituir en el módulo principal)

==========

Public puntos As Integer

Sub Main()

End Sub

Sub Juego(oShp As Shape)

If (Application.SlideShowWindows(1).View.Slide.SlideNumber = "1") Then puntos = 0

If (Application.SlideShowWindows(1).View.Slide.SlideNumber = "1" And oShp.Name =


"Cuatro") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "2" And oShp.Name =


"Cuarenta") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "3" And oShp.Name =


"Diez") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "4" And oShp.Name =


"Treinta") Then
MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "5" And oShp.Name =


"Dos") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "6" And oShp.Name =


"Tres") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "7" And oShp.Name =


"Dos") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "8" And oShp.Name =


"Cinco") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1

ElseIf (Application.SlideShowWindows(1).View.Slide.SlideNumber = "9" And oShp.Name =


"Cuatro") Then

MsgBox "¡Muy bien! " & oShp.TextFrame.TextRange.Text & " es la respuesta correcta.",
vbInformation + vbOKOnly

puntos = puntos + 1
'Respuestas incorrectas (las demás opciones)

Else

MsgBox "Lamentablemente, " & oShp.TextFrame.TextRange.Text & " no es la respuesta


correcta."

End If

ActivePresentation.Slides(10).Shapes("Total").TextFrame.TextRange.Text = puntos

Application.SlideShowWindows(1).View.Next

End Sub

'===== Final del Macro=========

Vous aimerez peut-être aussi