Display date and time
If you want it as a call up message box. Using your macro with an added line.
Private Sub txtTimeDAte_Change()
Dim MyDate
MyDate = Now ' MyDate contains the current system date.
MyDate = Format(MyDate, "dd,mmm yy hh:mm:ss AMPM ")
MsgBox MyDate
End Sub
If you want it on the worksheet, pick a cell and type "=Now()" without the
quote marks.
"Julian" wrote:
How can i display the date and time at real-time?Below is the script. Please
advice..
Private Sub txtTimeDAte_Change()
Dim MyDate
MyDate = Now ' MyDate contains the current system date.
txtTimeDAte.Text = Format(MyDate, "dd,mmm yy hh:mm:ss AMPM ")
End Sub
Julian
|