+ Reply to Thread
Results 1 to 4 of 4

sort protected workbook

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    sort protected workbook

    Hi,
    A workbook is password-protected to prevent other users from changing it (exept the unblockedcells of course). The system works well, i.e. the users can do anything they need to within the "password-protected" mode, except sorting.

    I solved this by creating a "sort" button. What it does : it unprotects the file, gives a pop-up message that the user has 6 seconds to sort, and then protects again.

    Smart users : they know that they can use this time to screw other things up.

    Here's my question : how can I enable sorting while keeping the file password-protected ?

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: sort protected workbook

    Good afternoon jokkebal

    To be honest, you're half-way there.

    You have just one macro linked to the sort button that unprotects the data, performs the sort, then re-protects the sheet again, all in one movement.

    Can't really take it any further than that without seeing the file, but the kind of task is the sort of thing that the macro recorder was invented for. Try it yourself and see how you go. If you get stuck, post back with your file.

    HTH

    DominicB



    Attaching a file :
    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitise the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: sort protected workbook

    Hi Dominic,

    I forgot to mention one important thing apparently ! The thing is that there are many columns in the file, and the user has to have to possibility to choose the column he wants to sort on. So the sorting itself can't be automated...

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: sort protected workbook

    Hi jokkebal

    The sorting can still be automated.
    If the user wants to sort on column Z, they would set, say, Z5 as the active cell and click on the sort button.

    As stated above, to take this further we really need to see how your data is set out.

    HTH

    DominicB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA code to update query from a password protected excel workbook and then close workbook
    By MrChipper in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2017, 07:41 AM
  2. Sort While Protected
    By DeanGilgrist in forum Excel General
    Replies: 5
    Last Post: 01-25-2016, 05:28 PM
  3. [SOLVED] Sort protected worksheet
    By scottbass in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-29-2014, 08:00 AM
  4. [SOLVED] Copy protected sheet to a NEW workbook that is not protected
    By lsteinbach in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2012, 11:50 AM
  5. [SOLVED] Group, Outline, Protected Worksheets and Protected Workbook
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2006, 04:45 PM
  6. Replies: 9
    Last Post: 07-25-2005, 08:05 AM
  7. [SOLVED] can i sort a protected sheet
    By sindu in forum Excel General
    Replies: 1
    Last Post: 06-17-2005, 04:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1