Protect sheet but enable auto filter drop down selection

Hassesbar

New Member
Joined
Jan 15, 2004
Messages
7
Hello,

I want protect a worksheet so a user cannot change the content of any cells. However, I would like the user to be able to use the autofilter that I have put on each column heading.

I'm using Excel 2000 SR-1

I'm a beginner when it comes to programming.

Many thanks,

Hassesbar :cry:
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Since you're not familiar with macros do the following:

1- Hit ALT-F11 to get to the VBE
2- In the VBE hit CTRL-R to view the Project Explorer
3- Find your workbook. It should look like:
VBAProject (yourfilename.xls) 
4- Click the + sign to open the file. Double-click on the item
named "ThisWorkbook" to open the module sheet.
5- Copy the following macro and paste it in this sheet:

Private Sub Workbook_Open()
With ActiveSheet
.EnableAutoFilter = True
.Protect DrawingObjects:=True, contents:=True, _
Scenarios:=True, UserInterfaceOnly:=True
End With
End Sub

Now you can hit ALT-F11 to return to Excel. Select the sheet that has your Autofilter and close the workbook.
When you reopen the workbook the Autofilter sheet will be protected but you will be able to use the Autofilter.

CHORDially,
Art Farrell
 
Upvote 0

Forum statistics

Threads
1,213,490
Messages
6,113,957
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top