+ Reply to Thread
Results 1 to 5 of 5

Is this possible?

  1. #1
    Registered User
    Join Date
    12-18-2004
    Posts
    43

    Arrow Is this possible?

    I have a spreadsheet with active columns from A6:X6. Active rows are up to 10000.

    I currently have the section linked and have made a sort macro. This works well if the sheet is unprotected. But I will need to protect the sheet in order for people to only enter data where I allow them to and to protect the formulas in the other cells. With protection on, I can't sort using the macro.

    Is it possible: to write a macro that would select unprotect sheet, type in the password DSKM, perform the alphabetical sort based on colum B6, then reprotect the sheet using the same password? In other words, unprotect the sheet only long enough for the sort and then reprotect it.

    Any help would be very much appreciated.

    JEN

  2. #2
    Registered User
    Join Date
    12-18-2004
    Posts
    43

    Is this possible

    Please forgive my poor use of terms. I have the selection grouped, not linked...sorry.

  3. #3
    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

    Smile

    Good afternoon Neb

    This should certainly be possible. Put this line before the sort routine:

    ActiveSheet.Unprotect Password:="DSKM"

    and this line after the sort routine:

    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="DSKM"

    HTH

    DominicB

  4. #4
    Registered User
    Join Date
    12-18-2004
    Posts
    43

    Works like a charm!

    Wow! Did you just make my life easier!

    Many thanks.

    JEN

  5. #5
    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

    Smile

    Hi Jen

    You're welcome. Appreciate the feedback.

    DominicB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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