+ Reply to Thread
Results 1 to 7 of 7

Enable Sorting A-Z in Locked Excel 2010 Workbook

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    11

    Enable Sorting A-Z in Locked Excel 2010 Workbook

    I have a workbook with a tab for each day of the month. This workbook is placed in a shared file and used by various yards in different locations. A new yard beginning the process is refusing to use it because due to formulas we must lock the workbook (contains many formulas and a live clock macro to track trip time) and they cannot sort A-Z. The sheets are labeled 1,2,3,4,5,6,7,8,9 and so on to 31. I know that you can write a Macro to allow sorting, but I cannot get it to work. the users CANNOT know the password due to hidden revenue etc. and formulas.
    Last edited by kdsanderson; 06-19-2014 at 04:20 PM. Reason: Solved

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    First, you should know that Excel workbooks aren't the most secure things in the world and anyone who really wants to crack one really can through any number of simple methods.

    That said, you can still totally do what you want. The exact code would depend on the dimensions of your worksheet, but it would look something like this:

    Please Login or Register  to view this content.
    This is sorting B4:B6 in ascending order, which would be assigned to a button. To hide the exposed password, you'd then go to Tools-VBA Project Properties, and assign a password to the code to protect anyone from being able to access it.

    This code unprotects, sorts, reprotects.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    Thank you so much for your help. Where it says sheet 3, will this only work on sheet 3? Meaning, do you have to paste this into each sheet, or just into a module. The range goes from column a2 to column AN1000, but several columns are hidden. They only need to sort by maybe 3 columns.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    Oh, we can definitely make this prettier I was just throwing it out there.

    You could make 3 buttons, for example. Button 1 is below, and sorts B4:D9 but only by Column B. In my example, I had formulas in E, F, & G that were left unmoved.

    I put the button at the top of Column B and relabeled it "Sort"

    Please Login or Register  to view this content.
    This code now specifically targets only the page the button is on. Now, maybe make 2 more buttons for Columns C and D, and alter the Key:=Range(" to target whatever column you want sorted by instead. Put those at the top of their respective columns. Copy those three buttons into each page. Shazam!

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    Here's a sample. The password to view the code is "trucks" which I've protected so you can see what others see if they try to look at the VB.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-30-2013
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    Thank you so much. that is very cool! I appreciate your help!

  7. #7
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Enable Sorting A-Z in Locked Excel 2010 Workbook

    No problem. I use this type of thing often to make projects idiot-proof so people can't mess them up, but still able to manipulate parts as needed.

    Good for calendars (to change year or month), employeee reviews, etc.

+ 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. UserForm: Enable Textbox When "Other" Selected in MultiSelect Listbox (Excel 2010)
    By excelforumkeys in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-02-2014, 06:40 PM
  2. Excel workbook that keeps me locked in
    By LMWI65 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-28-2013, 06:01 AM
  3. Enable Devloper Tab in excel 2010.
    By visha_1984 in forum Excel General
    Replies: 1
    Last Post: 02-18-2013, 03:15 AM
  4. Enable Macro in Excel 2010
    By VIJEXCEL in forum Excel General
    Replies: 3
    Last Post: 06-11-2012, 05:35 AM
  5. Can I "Enable Editing" using VBA on OPEN in Excel 2010
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2011, 07:39 AM

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