I guess if it were me, I'd design a form to duplicate the Custom AutoFilter dialog; show the form when the command button is clicked and use the data entered by the user to build the criteria1 and operator parameters of the Selection.AutoFilter instruction.
If you record and edit a few macros using the built in Custom AutoFilter dialog, you'll see the relationships between the data entered in the dialog and where they end up on the selection statement.
Both the VBA and the Excel help are great sources of information. As mentioned I was unable to find any information doing this with built in properties or methods. I'm currently using Excel 2002, so if you have a more recent model perhaps Microsoft addressed this issue.
I will now.
That is what I have been doing with most of them, creating macros then using autofilter options, than adapting it for my worksheet. Its just that recording the custom auto filter selection showed the code to be a bit more complicated, and I wanted to find the easiest way
When you say assignment, are you referring to homework
Yes I am
but don't worry I am well within limits. My assignment guidlines say I have to create the worksheets, not what happens in them, this is merely fixing an error. After all, I have done all of it myself, I can understand and apply it just this particular code eludes because excel does not give info on it....
Basically, here is a little inside into my code (if it helps)
Basically, you select the filter option you want from the drop down box. Then click the command button which executes the code.
Private sub [......]
Range("B3:B15").Select
If combobox = "Make" Then
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="Make"
End If
End subAnd here is the code I got from the Macros of Custom auto filter
ActiveWindow.SmallScroll Down:=-9
Selection.AutoFilter Field:=1, Criteria1:="=", Operator:=xlAndBut it is far to long for me to allow the user to do manually.