Private Sub btn1_Click()
Dim fechaactual As Date
Dim horaactual As Date
fechaactual = Date
horaactual = Now
MsgBox Year(fechaactual)
End Sub
Private Sub CommandButton1_Click()
Dim fechaactual As Date
Dim horaactual As Date
fechaactual = Date
horaactual = Now
MsgBox Hour(horaactual)
End Sub
Private Sub CommandButton2_Click()
Dim fechaactual As Date
fechaactual = DateValue("07/03/2019")
MsgBox fechaactual
End Sub
Private Sub CommandButton3_Click()
Dim fechaactual As Date
Dim fechaposterior As Date
fechaactual = DateValue("07/03/2019")
fechaposterior = DateAdd("d", 5, fechaactual)
MsgBox fechaposterior
End Sub
No hay comentarios:
Publicar un comentario