Hi Narayan,
One simple work around that I can suggest is, first type all the activities in activity name column and then select the start time column adjacent to this activity and click on Start Timer button that will populate the start time for all the selected cells by using the following lines of VBA Code :
Code:
Range(Cells(Selection.Rows(1).Row, Selection.Column), Cells((Selection.Rows(1).Row + Selection.Rows.Count) - 1, Selection.Column)).Value = Now
And then to update the End time and duration, again repeat the same activities, select the start time for all the activities that are yet to be populated with the end time and click on Stop Timer button, by writing the following lines of code:
Code:
'The following line populates the end time in column 23 for selected cells
Range(Cells(Selection.Rows(1).Row, 23), Cells((Selection.Rows(1).Row + Selection.Rows.Count) - 1, 23)).Value = Now
'The following line populates the duration formula in column 24 for selected cells
Range(Cells(Selection.Rows(1).Row, 24), Cells((Selection.Rows(1).Row + Selection.Rows.Count) - 1, 24)).FormulaR1C1 = "=IF(RC[-1]<>"""",RC[-1]-RC[-3]-RC[-2],"""")"
The other workaround that we can use is using the checkbox. Where we introduce a column before the activity with checkbox enabled and the user can select the checkbox and then click on the Start timer / stop timer button to update the start / end time.
Hope the above suggestions helps!!