macro woes

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I am having a problem with a macro I recorded...... it runs an auto filter.
The macro works fine until I protect the sheet.... then I get 'runtime
error 1004'
if i run the de-bugger the following shows up; .

Sub MAS()
'
' MAS Macro
' Macro recorded 1/19/2004 by Me
'

'
Range("I5:I113").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="y"
Range("A1").Select
End Sub

............and " Selection.AutoFilter " is highlighted
I have checked the security settings, and they are all medium.
In the protection window allow user to auto filter is selected.....
any hints for what is going wrong here?
thanks
 
-----Original Message-----
I am having a problem with a macro I recorded...... it runs an auto filter.
The macro works fine until I protect the sheet.... then I get 'runtime
error 1004'
if i run the de-bugger the following shows up; .

Sub MAS()
'
' MAS Macro
' Macro recorded 1/19/2004 by Me
'

'
Range("I5:I113").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="y"
Range("A1").Select
End Sub

............and " Selection.AutoFilter " is highlighted
I have checked the security settings, and they are all medium.
In the protection window allow user to auto filter is selected.....
any hints for what is going wrong here?
thanks


.
Start the macro while the spreadsheet is protected and as
part of the recorded steps of the macro start by
unprotecting the sheet - then do the autofilter and then
end the macro by protecting the sheet again
 
Back
Top