I am thinking something like this, but can not get it to work yet
Keep getting error code 13Code:Sub TestGetStartEndTime() Dim StartTime As Date, EndTime As Date, BreakTime As Date, TimeDiff As String BreakTime = CDate(1.00) StartTime = ActiveCell.Value EndTime = Application.InputBox("Select the cell with the ending time...", Type:=8) TimeDiff = Format(EndTime - StartTime, "h"" hours and ""m"" minutes""") MsgBox "Start time: " & StartTime & vbLf & "End time: " & EndTime & vbLf & "Time difference: " & TimeDiff - BreakTime End Sub




Reply With Quote
Bookmarks