PDA

View Full Version : Timer



The"Truth"
11-08-2008, 10:44 AM
I am currently very new to the programming world, and help with the following will greatly be appreciated.

I am currently trying to set up a command button on User Form (A) to call another user Form (B)(<---Which I have accomplished) once here I have 3 label boxes and a command button. Lablebox1 is the time that the button was clicked from Form (A). LabelBox2 will display the time that the command button on Form (B) is clicked. LabelBox 3 will display the difference between the two times in minutes. Once this is obtained, I would like for LableBox3 to send the info gathered back to User Form (A) to LabelBox4.If I can get this little problem behind me I believe that I can accomplish the rest.

***Note. The times that will be use will quite freqently will be from 11:59 PM to 12:01AM(NextDay)
Thanks for any help.

Bob Phillips
11-08-2008, 12:43 PM
On Userform2


Private InvokedAt As Date

Private Sub cmdOK_Click()
Label2.Caption = Format(Now)
Label3.Caption = Format(Now - InvokedAt, "hh:mm:ss")
UserForm1.Label4.Caption = Label3.Caption
End Sub

Private Sub UserForm_Activate()
InvokedAt = Now
Label1.Caption = InvokedAt
End Sub