Consulting

Results 1 to 6 of 6

Thread: Need Help W/Sort

  1. #1

    Need Help W/Sort

    Hi all,


    I have a filtered worksheet that is protected. In the protection dialog box I seleced allow filter and sort. However, when I try to sort using the filter, I get the message that the worksheet is protected. What am I doing wrong? How can I maintain the protection while allowing both sort and filter options?? Thanks,

    Thanks.
    Last edited by OrphanBear; 04-22-2009 at 10:31 AM.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I think you have to have the cells that you want to sort unlocked for that to work, that checkbox just makes the sort option available. Pretty dumb heh? It is probably simplest to create a macro that unprotects the sheet, sorts it, and protects it again.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks XLD - I thought I was doing something wrong. I don't know how the user will sort though - ascending or descending - how would the macro accomadate that??

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I would add two custom buttons to a toolbar. one up one down and disable sort and the sort buttons (or even redirect the buttons to my macros).
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Hmm, well, I was thinking maybe a worsheet_selectionchange even where if the header cell in the filtered column is selected, then the worksheet would unlock, and lock again at deselection. What to you think XLD, are there drawbacks to this. Many people will use this workbook so I can't place custom icons on my toolbar.

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    The drawbacks are that your worksheet is unlocked for an indeterminate amount of time, so why bother locking it at all?

    You can have custom buttons, the workbook can add them and remove them.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •