Line 6 of my code should in this scenario have an error. The number "18" should not be found in the search area and should skip the line of code and go to the Err5: call out several lines down. I have this line of code above and it runs through 4 scenarios just fine (I've also ran this many times with no error) all of a sudden now I am having an issue. Is there some underlying issue here that I am not doing correctly that makes this not robust??
Dim PS5 As String
On Error GoTo Err5:
'Stop Time
Workbooks(Import).Activate
Sheets(2).Activate
ActiveWorkbook.ActiveSheet.Range("G194:G236").Find ("18")
''''%%%'''should have error here if "18" not found
ActiveWorkbook.ActiveSheet.Range("G194:G236").Find("18").Select
PS5 = Selection.Offset(0, 1).Text
Workbooks(DRREPORT).Activate
ActiveWorkbook.ActiveSheet.Range(Home).Select
ActiveCell.Offset(2, 11) = PS5
Err:5
More code
Thanks for any help!!!
Dim PS5 As String
On Error GoTo Err5:
'Stop Time
Workbooks(Import).Activate
Sheets(2).Activate
ActiveWorkbook.ActiveSheet.Range("G194:G236").Find ("18")
''''%%%'''should have error here if "18" not found
ActiveWorkbook.ActiveSheet.Range("G194:G236").Find("18").Select
PS5 = Selection.Offset(0, 1).Text
Workbooks(DRREPORT).Activate
ActiveWorkbook.ActiveSheet.Range(Home).Select
ActiveCell.Offset(2, 11) = PS5
Err:5
More code
Thanks for any help!!!