when the code is searching for visible cells, and theres none to be found, I get this error (instead of what I would like it to do which is to jump down to my bm_Error_norecords line.) How can I get it to do this? Thanks
VBA Code:
Dim rNone As Long
On Error GoTo bm_Error_norecords
rNone = Worksheets("REPORTS").Range(Cells(20, 2), Cells(rRow, 2)).SpecialCells(xlCellTypeVisible).Cells.Count
On Error GoTo bm_Error_norecords
If rNone < 1 Then
MsgBox " Sorry, ZERO records were found. Please " & vbNewLine & " perform a new SEARCH but use either a " & vbNewLine & " new date range or with different variables. "
With ws
ActiveWorkbook.Worksheets("Seatex Incident Log").Activate
ActiveSheet.Range(Cells(18, 1), Cells(rCol, 49)).AutoFilter Field:=2
ActiveWorkbook.Worksheets("Seatex Incident Log").Range(Cells(rCol, 1), Cells(rCol, 1)).Select
End With
Unload Me
frmReportCriteria.Show