How to show time on a form
I ave had a crack at it based on code I have found. This is what I have in
the code section for the form
Private Sub Clock1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Clock1.Text = Format(Now, "hh:mm:ss")
Application.OnTime Now + TimeSerial(0, 0, 1), "clock1"
End Sub
My idea was that on a keypress the time would show up in the textbox
Clock1TextBox. No go though. Any more thoughts.
"NDBC" wrote:
I have two separate issues:
1) I would like to show an active clock on a form with the seconds ticking by.
2) I have a form with 5 text boxes and I don't want the cursor to move
between boxes when I press "Enter". Actually no matter which box I'm editing
I would like the cursor to go to the bottom box (TextBox1) on "Enter".
Can these be done.
|