Running macros on protected worksheets
Posted by andre delanchy on July 25, 2001 12:44 PM
I have a worksheet that has 2 very simple macros that run the Autofilter. However, if I protect the worksheet and use a password, Excel says 'you cannot use this command on a protected sheet'.
Would you know if there is a way around that. I need to keep the workbook protected so that other users cannot make changes to the worksheet, but are able to use the AutoFilter option (by clicking on the AutoFilter arrow).
Macro 1
Sub ShowLog()
Selection.AutoFilter Field:=1
End Sub
Macro 2
Sub HideLog()
Selection.AutoFilter Field:=1, Criteria1:="show"
Range("D5").Select
End Sub
I hope you can help with this query.
Regards
Andre