How can I detect an AutoFilter when the Criteria isnt Met

F

Frederick

I am hoping someone may be able to help with this problem please.

I have a general routine which looks at several worksheets and sets up an
AutoFilter but there may be occasions when the Criteria I have built into my
code is not satisfied.

I am selecting through code an AutoFilter on a Worksheet and setting the
criteria to filter on as "Open" however if the criteria isn't satisfied
then the Filter returns ALL data in the selection this really messes up my
sheet I am storing my results into.

Is there any way I can detect if the criteria doesn't exist such as for
example

If AutoFilter.Criteria NotExists Then Skip

I would be grateful for any help offered

Thanks

Fred.
 
F

Frederick

Thanks to both Steve and Tom.

Tom this is just the thing I was hoping for thanks a Million.

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top