Marco to open the "Customer Auto filter dialog box"

J

Johnnyboy5

The issue I've encountered is that the macro recorder can't be stopped
with the Custom Autofilter Dialog Box open. Is it possible to create a
macro to select "(Custom...)" from the drop down list, and have the
dialog box appears ready to enter what needs to be sorted.


Thanks very much ... its driving me MAD !
 
A

arjen van...

If you're using the macro recorder, you can just close the dialog box and
then stop the recorder. Then go back and edit your code, deleting everyting
that appears after the line opening the dialog box.
 
J

Johnnyboy5

If you're using the macro recorder, you can just close the dialog box and
then stop the recorder. Then go back and edit your code, deleting everyting
that appears after the line opening the dialog box.

Thanks, but i cant work out what needs to be deleted, there is very
little there. Can you show me a copy.

regards

J
 
A

arjen van...

I think I understand your question now, you just want the dialog box to
display so the user can enter their own criteria and then carry on with the
procedure. Macro recorder doesn't give the dialog box name and I don't know
it.

For a list of all dialog boxes, in Visual Basic Editor hit F2, then click on
Classes and xlBuiltInDialog in the list. Actually, I'm not sure if the list
includes everything.

Generally to show a dialog box, the code is:

Application.Dialogs(xlDialogActiveCellFont).Show

where the piece in the brackets is the specific dialog box you need.
 
D

Dave Peterson

You can look at VBA's help to see all the possible dialogs -- or use the object
browser and see a couple more that are hidden.

But when I did that, I didn't see any that looked like they matched the custom
autofilter dialog.

I'm not saying it can't be done. But I don't see how to do it.

If I _had_ to do it, I think I'd end up with a homemade userform that mimicked
that dialog thingy.
 

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