P
Pinda
I have this bit of code that I recorded and then edited
slightly: -
Sub AleBak()
'
' AleBak Macro
' Macro recorded 30/09/2003 by Bhupinder Rayat
'
'
Sheets("LDP Template").Select
ActiveSheet.AutoFilterMode = False
Selection.AutoFilter Field:=7, Criteria1:="Alex Baker"
End Sub
I have various macros linked to buttons like this. The
macros work fine, the above macros will display everything
relating to Alex Baker, as it will pick up Alex Baker from
the filter list. However, sometimes the macros fall down
and I get the following message:-
"Autofilter method of Range class failed".
When i debug, it has a problem with this line: -
Selection.AutoFilter Field:=7, Criteria1:="Alex Baker"
The macro failing sometimes places the filter in A1, or
gets rid of it altogether.
Can anyone explain why this might happen?
Hope ive explain well enough.
Thanks in advance.
Pinda
slightly: -
Sub AleBak()
'
' AleBak Macro
' Macro recorded 30/09/2003 by Bhupinder Rayat
'
'
Sheets("LDP Template").Select
ActiveSheet.AutoFilterMode = False
Selection.AutoFilter Field:=7, Criteria1:="Alex Baker"
End Sub
I have various macros linked to buttons like this. The
macros work fine, the above macros will display everything
relating to Alex Baker, as it will pick up Alex Baker from
the filter list. However, sometimes the macros fall down
and I get the following message:-
"Autofilter method of Range class failed".
When i debug, it has a problem with this line: -
Selection.AutoFilter Field:=7, Criteria1:="Alex Baker"
The macro failing sometimes places the filter in A1, or
gets rid of it altogether.
Can anyone explain why this might happen?
Hope ive explain well enough.
Thanks in advance.
Pinda