30.04.2013 Views

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ElseIf N = 6 Then : MsgBox “Junio”<br />

ElseIf N = 7 Then : MsgBox “Julio”<br />

ElseIf N = 8 Then : MsgBox “Agosto”<br />

ElseIf N = 9 Then : MsgBox “Setiembre”<br />

ElseIf N = 10 Then : MsgBox “Octubre”<br />

ElseIf N = 11 Then : MsgBox “Noviembre”<br />

ElseIf N = 12 Then : MsgBox “Diciembre”<br />

Else : MsgBox “Error de datos”<br />

End If<br />

Estructura Select Case<br />

Este estructura es una alternativa a la estructura<br />

If . . . Then . . . ElseIf, cuando lo que necesita es comparar<br />

la misma expresión con diferentes valores. Su sintaxis es la<br />

siguiente:<br />

Select Case EXPRESIÓN_TEST<br />

End Select<br />

Case EXPRESIÓN_1<br />

SENTENCIAS_1<br />

Case EXPRESIÓN_2<br />

SENTENCIAS_2<br />

.<br />

.<br />

.<br />

Case Else<br />

SENTENCIAS_FALSAS<br />

Pág. 34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!