Syph
06-20-2009, 12:01 PM
hi im trying to write a simple macro to apply an Auto filter.
I want the filter to take a user entered value from cell 'B2' and apply the auto filter to column B to show any entries that contain the user entered value.
Up to now this is what i have and i have no idea why it wont work!
Sub Marco10()
'
'
Range("B2").Select
Selection.Copy
Selection.AutoFilter Field:=2, Criteria1:="Selection.Paste", Operator:= _
xlAnd
End Sub
The .xls file is attatched if this helps.
Any help would be much appreciated!
Cheers
I want the filter to take a user entered value from cell 'B2' and apply the auto filter to column B to show any entries that contain the user entered value.
Up to now this is what i have and i have no idea why it wont work!
Sub Marco10()
'
'
Range("B2").Select
Selection.Copy
Selection.AutoFilter Field:=2, Criteria1:="Selection.Paste", Operator:= _
xlAnd
End Sub
The .xls file is attatched if this helps.
Any help would be much appreciated!
Cheers