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
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

anubis

Active Member
Joined
Dec 22, 2004
Messages
359
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.
 

ellac

New Member
Joined
Oct 4, 2004
Messages
37
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.
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
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
 

ellac

New Member
Joined
Oct 4, 2004
Messages
37
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
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,281
Messages
5,600,720
Members
414,401
Latest member
grenona2020

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
Top