allow filtering - prevent editing

S

SteveO

I've written before about a problem I was having when protecting a sheet from editing (except for me), but allowing other people the ability to filter. Since my version of excel is excel 2000, I was told to change the code in my Microsoft Visual Basic to the following

Private Sub Workbook_Open()
'check for filter, turn on if none exist
With Worksheets("Data"
If Not .AutoFilterMode The
.Range("A1").AutoFilte
End I
.EnableAutoFilter = Tru
.Protect Password:="password",
Contents:=True, UserInterfaceOnly:=Tru
End Wit
End Sub

However, that still did not work. What can I do. I appreciate your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top