Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have numerous options a user can pick and depending on this the field of
an autofilter must change, my code does not appear to work. Any Ideas? Thanks Private Sub Search_Click() Range("B3:L10").Select 'Set Field Dim myField As Integer If DateOp = True Then Set myField = 1 ElseIf TourRef = True Then Set myField = 2 ElseIf Country = True Then Set myField = 3 ElseIf Place = True Then Set myField = 4 ElseIf Spaces = True Then Set myField = 10 End If Selection.AutoFilter Field:=myFeild, Criteria1:=Search.Value, Operator:=xlAnd End Sub -- Cheers, Ben Remove your.tonsils to reply "You only live once but if you do it right once is enough!" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic autofilter field | Excel Discussion (Misc queries) | |||
Windows search in Excel with autofilter | Excel Discussion (Misc queries) | |||
Search using Autofilter | Excel Programming | |||
using autofilter to search 2 columns | Excel Programming | |||
Use sheet name as search string or autofilter criteria | Excel Programming |