I am faced with a challenge I can not seem to overcome.
the user enters or paste data in column b. then he/she clicks on the Start Button. that action moves the focus to the d column and the current time is entered. At this point, the cell d where the time has been entered should be locked so that it can not be modidied. at the same time the cell has moved to the e column on the same row. When the user clicks on the Stop button (the same button), the same action just described should take effect and lock the e cell. The actual time spend between the start and stop cells is recorded in the f column and that one too, should be locked. The user will do that a number of time during the day. the total procedure caluculates the time difference and adds that value to column f
here is the code for the start/stop button
Private Sub CommandButton1_Click()
If ActiveCell.Value = "" And CommandButton1.Caption = "Start" Then