+ Reply to Thread
Results 1 to 3 of 3

Enable Outlining in multiple proected worksheets

  1. #1
    Registered User
    Join Date
    07-21-2015
    Location
    Vancouver, BC Canada
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Enable Outlining in multiple proected worksheets

    I am hoping someone can assist me with this one. I'm using the following VBA code to allow users to open/close groups on protected worksheets, but do not know the syntax to have this affect all worksheet tabs. Using the code below, it works on the Highland tab. I have 3 protected worksheets that I need to allow to do this, called:

    Highland
    Guildford
    Southwood


    I have posted this code on "ThisWorkbook object:

    Private Sub Workbook_Open()
    With Worksheets("Highland")
    .Protect Password:="password", Userinterfaceonly:=True
    .EnableOutlining = True
    End With
    End Sub

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Enable Outlining in multiple proected worksheets

    Please Login or Register  to view this content.
    I use the UCASE to make the name uppercase to prevent any issues around that.
    So the code loops through ALL the worksheets and if it is one of the three then it does that code, otherwise it does nothing.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    07-21-2015
    Location
    Vancouver, BC Canada
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: Enable Outlining in multiple proected worksheets

    Thank you! It worked beautifully! Very much appreciated.

+ 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. Enable Outline/Outlining on a Protected Excel Worksheet in a Shared Workbook
    By miles827 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2017, 10:45 AM
  2. Enable outlining in a shared/protected workbook
    By miles827 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2017, 10:38 AM
  3. Replies: 0
    Last Post: 08-06-2013, 08:21 AM
  4. Replies: 3
    Last Post: 06-04-2013, 06:42 PM
  5. Big challenge: protect multiple sheets AND enable outlining AND enable insert comment
    By visschercaravelle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-23-2010, 11:46 AM
  6. Replies: 0
    Last Post: 03-22-2010, 09:56 PM
  7. Protection and Enable Outlining
    By Vlado Sveda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2006, 11:25 AM
  8. [SOLVED] Copying formats - column widths, formats, outlining to worksheets
    By DavidBr318 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2005, 09:05 AM

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