Hi all,
i have currently a userform which when a user click the start button time the time and date appears a1/b1 respectively.in c1 an activity appears.
When the user then clicks stop the end time date appears in d1/e1.
My question is, is it possible to press start and select an activity and then start another activity but the program still remembers when you press stop for a certain activity it remembers which start time to put the stop time to.
current is this
Code
Private Sub ComboBox1_Change()
ComboBox1.AddItem "Setting up a new Bank"
ComboBox1.AddItem "New Account"
ComboBox1.AddItem "Change Account"
ComboBox1.AddItem "Close "
'do not hard code
End Sub
Private Sub CommandButton1_Click()
If CommandButton1.Caption = "Start" Then
CommandButton1.Caption = "Stop"
Set Rng = Cells(Rows.Count, "A").End(xlUp)(2, 1)
Rng(1, 1).Value = Date
Rng(1, 2).Value = Time
Rng(1, 3).Value = ComboBox1
Else
CommandButton1.Caption = "Start"
Set Rng = Cells(Rows.Count, "A").End(xlUp)(2, 1)
Rng(0, 4).Value = Date
Rng(0, 5).Value = Time
End If
End Sub
Private Sub CommandButton2_Click()
With Cells(65536, 4).End(xlUp).Offset(2, 1)
If IsEmpty(.Offset(0, -1)) Then
MsgBox "You forgot to push the Start Button first"
Else
.Value = Date
.Offset(0, 1).Value = Time
End If
End With
End Sub
Display More