Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
Hi,
I would like to ask "How to enable sorting and Filtering" after protecting a worksheet. Since I don't want users to modify the worksheet don't can use the Autofilter and sorting function. Does it invlve macro? Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
In Excel 2002 and later, you can allow users to sort a protected sheet by
going to the Tools menu, choosing Protect Sheet and putting a check next to "Sort" in the "Allow all users of this worksheet to:" list box. This is not available in earlier versions. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "K.Parker" wrote in message ... Hi, I would like to ask "How to enable sorting and Filtering" after protecting a worksheet. Since I don't want users to modify the worksheet don't can use the Autofilter and sorting function. Does it invlve macro? Thanks for your help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
I had a similar type issue a long while ago. What I did was created a macro
that unprotected the worksheet, did the sorting, then password protected the worksheet again. This was done in XL97. Your code may look something like: Workbooks("Book1.xls").Worksheets("Sheet1").Unprot ect Password := "Password" <Put in your sorting/filtering code Workbooks("Book1.xls").Worksheets("Sheet1").Protec t Password := "Password" If you are working with Excel 2002 or later, you do have a worksheet protection option, though there's a catch to it too. When you protect the worksheet, you can allow for either, or both, Sorting and Filtering. The catch to this, ALL of the cells within the sorting/filtering area MUST BE UNPROTECTED with which ever or both of these options set to "True", in order for the user to sort/filter the sort/filter area on a protected worksheet. For more info on this, you can goto Excel VBA help, and look under the "Protect Method" help page, or the spreadsheet side of the protection under "About worksheet and workbook protection". However, the VBA help page gives you more specific information than the spreadsheet side help page does, which can prove to be very useful. -- Ronald R. Dodge, Jr. Production Statistician Master MOUS 2000 "K.Parker" wrote in message ... Hi, I would like to ask "How to enable sorting and Filtering" after protecting a worksheet. Since I don't want users to modify the worksheet don't can use the Autofilter and sorting function. Does it invlve macro? Thanks for your help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
Look in help at the enableautofilter property in Excel VBA help.
for sorting, you would have to offer an interface to the user that triggers code to unprotect the worksheet, sorts it, and reprotects it. -- Regards, Tom Ogilvy "K.Parker" wrote in message ... Hi, I would like to ask "How to enable sorting and Filtering" after protecting a worksheet. Since I don't want users to modify the worksheet don't can use the Autofilter and sorting function. Does it invlve macro? Thanks for your help. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
Thanks for all of your help in such a short time.
I am now working on this. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to enable sorting and filtering?
See answers from Chip and Ronald if you have xl2002 and all your users would
have xl2002. -- Regards, Tom Ogilvy "K.Parker" wrote in message ... Thanks for all of your help in such a short time. I am now working on this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting or Filtering | Excel Discussion (Misc queries) | |||
Sorting and filtering HELP!!!!! | Excel Worksheet Functions | |||
Sorting/Filtering | Excel Discussion (Misc queries) | |||
sorting and filtering | Excel Worksheet Functions | |||
Sorting and filtering | Excel Worksheet Functions |