+ Reply to Thread
Results 1 to 7 of 7

Thread: Enabled outline in a worksheet protected

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    Venezuela
    MS-Off Ver
    Excel 2007
    Posts
    25

    Enabled outline in a worksheet protected

    Hello How are you?

    How do I do if I protect a sheet in a workbook but I want to outline enabled in a worksheet?

    Thanks for your answers!

    Best regards!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: Enabled outline in a worksheet protected

    Can you not enable formats in the protection option?

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Enabled outline in a worksheet protected

    You have to use code to set the EnableOutlining property of the sheet and then protect it with the Userinterfaceonly:=true option. Note that this has to be done each time you open the workbook - sample code:
    activesheet.enableoutlining = true
    activesheet.protect userinterfaceonly:=true

  4. #4
    Registered User
    Join Date
    08-26-2010
    Location
    Venezuela
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Enabled outline in a worksheet protected

    Thank you very much for your answer, that's what I needed.

    I have only one question, how I can do to apply to all sheets of a book?

    Best regards from Venezuela.

    Juan

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Enabled outline in a worksheet protected

    You would need a loop:
    Sub EnableGrouping()
       DIm wks as worksheet
       for each wks in thisworkbook.worksheets
          wks.enableoutlining = true
          wks.protect userinterfaceonly:=true
       next wks
    End Sub
    and then call that sub from the Workbook_Open event or an Auto_Open routine.

  6. #6
    Registered User
    Join Date
    08-26-2010
    Location
    Venezuela
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Enabled outline in a worksheet protected

    Thanks a lot it works nice!

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Enabled outline in a worksheet protected

    Glad to help.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0