hey all i've got the following code to show the time in a label
VB Code:
timee = Format(Time, "hh:mm") Me.Label1.Caption = timee
how could i have it when you click on a button it adds say 3 mins to the current time displayed in the label ?
Printable View
hey all i've got the following code to show the time in a label
VB Code:
timee = Format(Time, "hh:mm") Me.Label1.Caption = timee
how could i have it when you click on a button it adds say 3 mins to the current time displayed in the label ?
Use DateAdd() function:
VB Code:
Private Sub Command1_Click() Label1.Caption = Format(DateAdd("n", 3, Now), "hh:nn:ss") End Sub
VB Code:
Private Sub Command1_Click() timee = DateAdd("n", 3, timee) End Sub
alrigh worked thanks alot :wave: