Borrar fecha en un Text cuando trae una fecha automática
Publicado por RENE (7 intervenciones) el 19/04/2023 16:49:19
Cordial Salado,
Estoy realizando unas pruebas para un proyecto, pero estoy llamando una fecha automática a dos text pero anexo un botón para limpiar y no hace ninguna acción, me gustaría saber si existe alguna forma de forzar esta limpieza.
Gracias
------------------------
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
TextBox1.Text = Format(Now, "dd/MM/yyyy HH:mm tt")
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Me.TextBox2.Text = Format(Now, "dd/MM/yyyyy hh:mm tt")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox2.Text = ""
TextBox1.Clear()
End Sub
#End Region
End Class

Estoy realizando unas pruebas para un proyecto, pero estoy llamando una fecha automática a dos text pero anexo un botón para limpiar y no hace ninguna acción, me gustaría saber si existe alguna forma de forzar esta limpieza.
Gracias
------------------------
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
TextBox1.Text = Format(Now, "dd/MM/yyyy HH:mm tt")
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Me.TextBox2.Text = Format(Now, "dd/MM/yyyyy hh:mm tt")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox2.Text = ""
TextBox1.Clear()
End Sub
#End Region
End Class
Valora esta pregunta


0