View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Roady Roady is offline
external usenet poster
 
Posts: 69
Default Sort ascending or descending in protected worksheet

Hi John and Dave:

I have done both of what you have said, however it gives me the following
error message after being re-protected, "The cell or chart you are trying to
change is protected and therefore read-only. to modify a protected cell or
chart, first remove protection using the Unprotect Sheet command...etc."
Just so I am clear, I want the user to be able to sort and/or filter AFTER
the macro has been run and the sheet is re-protected. In the protect sheet
check box selections, I do select 'allow sort' but somehow it never allows
it. I have the following coding in my macro that should allow that but
somehow does not work:
ActiveSheet.Protect Password:="ABCD", AllowFiltering:=True, AllowSorting:=True

Another weird thing is that even though in the check boxes I select 'Allow
Column Formatting' and 'Allow Row Formatting', it unchecks it after
re-protecting again. HELP! Thanks. :)

"John C" wrote:

When protecting a sheet, there is actually a checkbox for SORT. I recorded a
very quick macro, after the statement
ActiveSheet.Protect
you probably have several items here but you would want to include
AllowSorting:=True
--
** John C **

"Roady" wrote:

Hi:
I have an Excel document that is protected. There are macros buttons on the
page which contain un-password protect and then re-protecting at the end to
allow it to perform certain functions for the end-user. However, when I try
to sort ascending or descending, it does not allow it. What is the code for
this?

thank you,
Jen