ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time in a TextBox (https://www.excelbanter.com/excel-programming/430631-re-time-textbox.html)

Patrick Molloy

Time in a TextBox
 


Private Sub TextBox1_Change()
TextBox3.Value =format$( Now(),"HH:MM")
End Sub


"Patrick C. Simonds" wrote in message
...
I would like the code below to put the current time (in 24 hour format) in
TextBox3. So how can I modify this so I only get the time and not the date
and have the displayed time in the 24 hour format (18:45 for 6:45pm)

Private Sub TextBox1_Change()
TextBox3.Value = Now()
End Sub




All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com