Private Sub Cmd_mes_Click()
Dim mes As Integer
mes = InputBox("CAPTURE EL MES", "MESES", 0)
Select Case mes
Case 1, 3, 5, 7, 8, 10, 12: MsgBox "EL MES TIENE 31 DIAS", vbInformation
Case 2: MsgBox "EL MES TIENE 28 DIAS", vbInformation
Case 4, 6, 9, 11: MsgBox "EL MES TIENE 30 DIAS", vbInformation
Case Else: MsgBox "NO EXISTE ESTE VALOR", vbCritical
End Select
End Sub
Dim mes As Integer
mes = InputBox("CAPTURE EL MES", "MESES", 0)
Select Case mes
Case 1, 3, 5, 7, 8, 10, 12: MsgBox "EL MES TIENE 31 DIAS", vbInformation
Case 2: MsgBox "EL MES TIENE 28 DIAS", vbInformation
Case 4, 6, 9, 11: MsgBox "EL MES TIENE 30 DIAS", vbInformation
Case Else: MsgBox "NO EXISTE ESTE VALOR", vbCritical
End Select
End Sub

No hay comentarios:
Publicar un comentario