Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kim
 
Posts: n/a
Default Custom Filter that Displays All But in Ascending or Decending Orde

I have a worksheet that is password protected. The creator of the sheet
would like her users to be able to sort the data without unlocking the cells
(don't want others to edit the content) which is not possible in Excel. I
have tried recroding a macro to unprotect the sheet, perform a SORT and the
reprotect the sheet -- but the users are still prompted to enter a password
to unprotect the sheet.

The creator has also added an Auto Filter to the sheet which works while
protected. Is there a way to create a custom AutoFilter that will display
all entries in alphabetical order? -- similar to a sort?

Thanks. Kim
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

Do not know how to sort a Autofilter.

Why not change the macro so's it doesn't ask for a password?

Sub Sort_stuff()
ActiveSheet.UnProtect Password:="justme"

'your code to do the sorting

ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True, AllowFiltering:=True
End Sub


Gord Dibben Excel MVP

On Tue, 13 Sep 2005 14:28:18 -0700, Kim wrote:

I have a worksheet that is password protected. The creator of the sheet
would like her users to be able to sort the data without unlocking the cells
(don't want others to edit the content) which is not possible in Excel. I
have tried recroding a macro to unprotect the sheet, perform a SORT and the
reprotect the sheet -- but the users are still prompted to enter a password
to unprotect the sheet.

The creator has also added an Auto Filter to the sheet which works while
protected. Is there a way to create a custom AutoFilter that will display
all entries in alphabetical order? -- similar to a sort?

Thanks. Kim


  #3   Report Post  
dominicb
 
Posts: n/a
Default


Good evening Kim

In short, no. But you were on the right lines by writing a macro that
will unprotect the sheet, sort the contents and reprotect it. You just
need to specify the password (in the example below, pword1) to Excel,
thus:

ActiveSheet.Unprotect Password:="pword1"

and something like this to reprotect it:

ActiveSheet.Protect Password:="pword1"

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=467269

  #4   Report Post  
Kim
 
Posts: n/a
Default

Thank you Thank you Thank you to both.

"dominicb" wrote:


Good evening Kim

In short, no. But you were on the right lines by writing a macro that
will unprotect the sheet, sort the contents and reprotect it. You just
need to specify the password (in the example below, pword1) to Excel,
thus:

ActiveSheet.Unprotect Password:="pword1"

and something like this to reprotect it:

ActiveSheet.Protect Password:="pword1"

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=467269


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
custom filter does not work correctly RJ Excel Discussion (Misc queries) 1 September 9th 05 07:34 PM
Custom Auto Filter default setting should be contains dmc Excel Worksheet Functions 0 June 14th 05 07:54 AM
Custom Filter Problem plindman Excel Discussion (Misc queries) 2 June 2nd 05 04:30 PM
custom filter does not work when selecting 'equals' X AND 'equals' plindman Excel Discussion (Misc queries) 1 June 1st 05 11:29 PM
Heelp...the "begin with" custom filter does not work Question_from_holland Excel Discussion (Misc queries) 2 January 13th 05 01:05 PM


All times are GMT +1. The time now is 01:11 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"