|re: Single Stepping - "Just tried that and discovered where it freezes"|
It's amazing what some simple debugging techniques will do for you, isn't it? ;-)
Have you reviewed the following tutorial? Single Stepping, Watches, Break Points and Run To Cursor are all extremely powerful debugging techniques. As you have seen, just running the code full speed and then trying to find the bugs based on the results, or worse yet on a crash, can be a very frustrating practice.
Before I address your specific issue, please keep in mind that it is next to impossible for any of us to duplicate your workbook structure and actually run your code. The best we can do is try to troubleshoot your issues by reviewing the "text" of your code and hopefully understand what it is supposed to do. At that point, it's up to you to test our suggestions or tell us what we missed so we can try again.
It appears to me that this instruction sets a Range variable (rng) to the range of cells displayed once the Filter as been applied.
' Only send the visible cells in the selection.
Set rng = ActiveSheet.Range("a6", ActiveSheet.Range("H6").End(xlDown))
Have you looked at the address of rng? e.g. rng.address?
If I understand your problem correctly, you are ending up with an "empty" range if Criteria1 is not found. Therefore rng.address probably reads something like
If that is the case, then you could check the address and not call the function if the Filter results are empty.
Set Rng = ActiveSheet.Range("a6", ActiveSheet.Range("H6").End(xlDown))
If Rng.Address = "$A$6:$H$1048576" Then
MsgBox "Criteria Not Found"
Else: 'Do whatever you want with the results of the Filter
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.