Making a settable clock in vba excel

I need to make a clock that works off the system time when ran, but also has an option to set. It needs to have a set button, a reset button which makes it go back to system time, and buttons to change the hours and minutes separately. It also needs to display am/pm.

I honestly have no Idea where to begin. If someone wants to make up a program for me I'd have no problem paying them for their time via paypal....But like I said any help is greatly appreciated.

This is all I have so far.
userform:
Public Sub UserForm_Initialize()
Do
Call CurrentTime
Loop Until CommandButton4.Enabled
End Sub

Public Sub UserForm1_Click()
Do
UserForm1.Label1.Caption = Hour(Now)
UserForm1.Label2.Caption = Minute(Now)
UserForm1.Label3.Caption = Second(Now)
Loop Until CommandButton4.Enabled
End Sub


Public Sub CommandButton4_Click()
Call settime
End Sub


Private Sub CommandButton1_Click()
Dim x As Integer
x = x + 1
UserForm1.Label1.Caption = x
End Sub

Private Sub commandbutton2_click()
Dim y As Integer
y = y + 1
UserForm1.Label2.Caption = y
End Sub

Private Sub commandbutton3_click()

UserForm1.Label1.Caption = Hour(Now)
UserForm1.Label2.Caption = Minute(Now)
UserForm1.Label3.Caption = Second(Now)
End Sub




module 1

Sub CurrentTime()
UserForm1.Label1.Caption = Hour(Now)
UserForm1.Label2.Caption = Minute(Now)
UserForm1.Label3.Caption = Second(Now)

Application.OnTime Time + TimeValue("00:00:01"), "CurrentTime"
Format (LongTime)

End Sub



module2

Sub settime()
UserForm1.Label1.Caption = Int(0)
UserForm1.Label2.Caption = Int(0)
UserForm1.Label3.Caption = Int(0)
End Sub
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories