locking sheets

ellac

New Member
Joined
Oct 4, 2004
Messages
37
Hi Everyone

Can anyone tell me if it it possible to lock sheets in a workbook and still have some features available like Sorting and Filtering?

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Go to Tools > Protection > Protect Sheet... and have a look at the user options. In office XP 2002, AutoFilter and Sort are among the options available.
 
Upvote 0
What about Excel 2000

Hi and thanks for that answer. I was wondering does 2000 have the same option or is there another way around it.

Thanks again.
 
Upvote 0
Not in 2000, but you can record a macro on an unprotected sheet to capture the Filter and Sort settings, then assign them to a button. Just put ctiveSheet.Unprotect at the beginning of each code set and ActiveSheet.Protect at the end.

Post back with what you get if you need help adjusting the range parameters.

HTH,

Smitty
 
Upvote 0
Not sure of how to create the code

Hi

Sounds great, but I am not sure of how to write the code in vba to do what you are explaining. Do you have an example.

Thanks again
 
Upvote 0
Here's a basic example:
Code:
Sub Macro1()
    ActiveSheet.Unprotect
        Range("A1:C3").Sort Key1:=Range("C3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    ActiveSheet.Protect
End Sub
Smitty
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,575
Members
449,089
Latest member
Motoracer88

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