Hi,
Can anyone help me solving the issue mentioned below.
Following is the subset of code for which I'm getting runtime time error 91:
StartTime = InputBox("Enter the Start time in hh:mm:")
EndTime = InputBox("Enter the End time in hh:mm:")
Selection.Find(What:=StartTime, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Temp = ActiveCell.Row
Range("C" & (Temp - 1)).Select
'startrow = ActiveCell.Row
Range(Selection, Cells(1)).Select
Selection.EntireRow.Delete
Range("A1").Select
Columns("C:C").Select
Selection.Find(What:=EndTime, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Now for starttime I am not getting this error but while searching endtime I am getting runtime error 91
Can anyone help me solving the issue mentioned below.
Following is the subset of code for which I'm getting runtime time error 91:
StartTime = InputBox("Enter the Start time in hh:mm:")
EndTime = InputBox("Enter the End time in hh:mm:")
Selection.Find(What:=StartTime, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Temp = ActiveCell.Row
Range("C" & (Temp - 1)).Select
'startrow = ActiveCell.Row
Range(Selection, Cells(1)).Select
Selection.EntireRow.Delete
Range("A1").Select
Columns("C:C").Select
Selection.Find(What:=EndTime, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Now for starttime I am not getting this error but while searching endtime I am getting runtime error 91