+ Reply to Thread
Results 1 to 2 of 2

Keep ungroup-group feature in a locked worksheet

  1. #1
    Registered User
    Join Date
    09-06-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    15

    Keep ungroup-group feature in a locked worksheet

    Hi all,

    I would like to ask you help on the following.
    I am the owner of an extensive Excel model. For this model, I would like to use the following options when the worksheet is locked:
    1) Be able to group-ungroup columns
    2) Be able to use AutoFilter

    In VBA I used the following macro:

    Private Sub workbook_open()
    ActiveSheet.Unprotect "blabla"
    Cells.Locked = True
    EnableOutlining = True
    Protect Password:="blabla", userinterfaceonly:=True, AllowFiltering:=True
    End Sub

    Both Group-Ungroup and Filtering work perfectly once I lock the worksheet after running the macro. If I save the file however, and open the file again, the filtering still works but the group-ungroup does not.

    What is the reason and the solution for this, making the group-ungroup work again?

    Many thanks!!!

    Best, Alinda

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Keep ungroup-group feature in a locked worksheet

    Hello alinda,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ 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