Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to enable sorting and filtering?

Thanks for all of your help in such a short time.
I am now working on this.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting or Filtering JD Excel Discussion (Misc queries) 5 August 21st 09 05:58 PM
Sorting and filtering HELP!!!!! Yossy Excel Worksheet Functions 2 May 12th 08 04:38 AM
Sorting/Filtering Brandy Excel Discussion (Misc queries) 5 February 11th 08 09:02 PM
sorting and filtering Duncan McDowell Excel Worksheet Functions 1 June 28th 05 03:02 PM
Sorting and filtering dsbiloxi Excel Worksheet Functions 7 March 10th 05 11:55 PM


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"