Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Enabling Autofilter and Sorting in a Protected Sheet

Is it possible to "Allow" Sorting and use of Autofilter with respect
to Locked cells when the worksheet is Protected?

Even though I have checked both 'Sort' and 'Use Autofilter' under the
"Allow all users of this worksheet to:" options list, when enabling
protection, I am not able to perform either operation when the target
cells are Locked.

If I set the cells to be sorted or filtered to be Unlocked then it
works just fine when the worksheet protection is enabled.

I have "read" that by selecting the appropriate "Allow users to ...."
option the desired functionality should work with respect to target
cells that are set to the Locked status - what do I need to do
differently?

Any guidance would be greaty appreciated.

Thanks!

John
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Enabling Autofilter and Sorting in a Protected Sheet

Even though you select those options there are severe limitations and
conditions

Autofiltering.................only if Autofilter is enabled prior to
protecting the sheet

Sorting..............sort only a block of contiguous unlocked cells.

The only way around all the restrictions is have a macro which
Unprotects the sheet, does the sort or filter then Reprotects.



Gord

On Mon, 2 Jan 2012 21:05:26 -0800 (PST), wrote:

Is it possible to "Allow" Sorting and use of Autofilter with respect
to Locked cells when the worksheet is Protected?

Even though I have checked both 'Sort' and 'Use Autofilter' under the
"Allow all users of this worksheet to:" options list, when enabling
protection, I am not able to perform either operation when the target
cells are Locked.

If I set the cells to be sorted or filtered to be Unlocked then it
works just fine when the worksheet protection is enabled.

I have "read" that by selecting the appropriate "Allow users to ...."
option the desired functionality should work with respect to target
cells that are set to the Locked status - what do I need to do
differently?

Any guidance would be greaty appreciated.

Thanks!

John

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Enabling Autofilter and Sorting in a Protected Sheet

Gord Dibben was thinking very hard :
The only way around all the restrictions is have a macro which
Unprotects the sheet, does the sort or filter then Reprotects.


To add...
I usually use a _SheetActivate event to reset protection and specify
UserInterfaceOnly:=True in the args (because this doesn't persist
between sessions). This usually serves using VBA macros to do sorting,
outlining, or toggling AutoFilter to specific ranges. I may be wrong
but my understanding of how the sheet protection rules work is they are
only applied to the UI, and must be managed by VBA in one way
(protect/unprotect) or the other. I prefer the other because I don't
need to code specially for protected sheets otherwise. Sheet protection
settings are stored in local defined names so I don't have to test if a
sheet needs protection reset when activated because that event fires on
every sheet regardless if it's to be protected or not based on the
value stored in ActiveSheet.Names("uiProtect"). Probably a bit more
complex than what's needed here but it's a standard I use for all
projects since most all of my projects are multi-sheet/multi-file apps.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
Enabling formulas in a semi-protected sheet cbr Excel Worksheet Functions 0 November 22nd 10 01:36 PM
Use autofilter with macro in a protected sheet Minos Excel Discussion (Misc queries) 1 August 4th 09 03:44 PM
Autofilter in protected sheet Javier Excel Worksheet Functions 5 March 24th 08 05:56 PM
Applying autofilter to protected sheet Brian Ferris Excel Discussion (Misc queries) 2 November 18th 05 04:28 PM
Enabling macros while the sheet being protected ! dinesh Excel Discussion (Misc queries) 13 September 27th 05 08:47 PM


All times are GMT +1. The time now is 06:21 AM.

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"