ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to show time on a form (https://www.excelbanter.com/excel-discussion-misc-queries/235386-how-show-time-form.html)

NDBC

How to show time on a form
 
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.

NDBC

How to show time on a form
 
I have fixed problem with tab stops. I looked through properties before for
this but must have missed it. I'm still having trouble showing a running
clock though if anyone can please help.


"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.


NDBC

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.



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

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