+ Reply to Thread
Results 1 to 6 of 6

Group/Ungroup Protected Worksheets with Multiple Tabs

  1. #1
    Registered User
    Join Date
    03-06-2020
    Location
    Greensboro, NC
    MS-Off Ver
    Office 365
    Posts
    2

    Group/Ungroup Protected Worksheets with Multiple Tabs

    Hi,

    I have a workbook where I have multiple tabs, and will occasional add more, that are identical and contain the same type of data just for different companies. The file is very complex for users within my company so I need to protect the formulas so they are not overwritten however I must have the ability to group/ungroup (currently the file is columns A-BQ). I've found the VBA code to allow this to happen once I protect the formula however it only works on a single tab, all other tabs do not allow it when I protect. I have tried entering it as a module for every worksheet as well as for "ThisWorkbook", nothing seems to work.

    Below is the VBA that works on a single tab. How on earth can I get this to work on every tab?? I'm banging my head because I can only find single worksheets when I search online. I really hope that somebody is able to help.

    Thank you in advance!

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-06-2020 at 07:38 PM. Reason: Added required CODE tags as per FORUM RULES, please take a moment to read them (link above in menu bar)

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Group/Ungroup Protected Worksheets with Multiple Tabs

    Something like this:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Group/Ungroup Protected Worksheets with Multiple Tabs

    Untested, but something like:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Group/Ungroup Protected Worksheets with Multiple Tabs

    Is this resolved?

  5. #5
    Registered User
    Join Date
    03-06-2020
    Location
    Greensboro, NC
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Group/Ungroup Protected Worksheets with Multiple Tabs

    Unfortunately no. :-(

    I decided in the last couple days since I was running into so many issues to create seperate files based off the original because the VBA would work with the original. Once I start saving as different names the files no longer worked.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Group/Ungroup Protected Worksheets with Multiple Tabs

    Sounds like you'd be better persevering with resolving the problem(s) you have rather than go looking for a new set .

    You have been given two pretty much identical solutions so, in theory, I would expect them to do what you want.

    Note that the Active sheet may not what you expect it to be. The Active sheet when you open the workbook will be whatever was selected/in use when the workbook was last saved and closed.

    Did the solution(s) provided resolve the initial problem?

+ 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. [SOLVED] Macros to Group Tabs, Delete Row, and Ungroup Tabs Required???
    By seash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2015, 09:15 AM
  2. [SOLVED] Group/Ungroup in a Protected Sheet
    By ExcelManager01 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-21-2013, 10:39 AM
  3. Group/Ungroup with sheet protected
    By robrobet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2013, 03:52 PM
  4. [SOLVED] Using Group and Ungroup on multiple sheet when password protected
    By RandyD123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2013, 08:12 AM
  5. Allow Group/Ungroup while Protected
    By winewaldo in forum Excel General
    Replies: 3
    Last Post: 01-16-2012, 12:25 PM
  6. Protected Sheet (Group/Ungroup)
    By Merlin54k in forum Excel General
    Replies: 5
    Last Post: 05-14-2007, 03:39 AM
  7. Group and ungroup protected sheets
    By bob in forum Excel General
    Replies: 1
    Last Post: 02-28-2005, 10:06 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