Posts

Showing posts with the label fun

VBA - Fun - timer

 The following code does not belong to me, comment at below if you know the coder name / link . I will happily edit to put the source . Private Sub Form_Timer()     Dim CurTime As Date     Dim ValHours As Integer     Dim ValMinutes As Integer     Dim ValSeconds As Integer          CurTime = Time     ValHours = Hour(CurTime)     ValMinutes = Minute(CurTime)     ValSeconds = Second(CurTime)          pgrHours.Value = ValHours     pgrMinutes.Value = ValMinutes     pgrSeconds.Value = ValSeconds          lblHours.Caption = CStr(ValHours)     lblMinutes.Caption = ValMinutes     lblSeconds.Caption = CStr(ValSeconds) End Sub