VBA for using groups in a protected workbook

Rebro88

New Member
Joined
May 30, 2018
Messages
7
Hi guys,

I'm currently in the process of creating a training matrix.
I designed the layout thinking I wouldn't need to go the lengths of protecting certain areas of the work sheets, but a colleague of mine has proven me wrong.
I protected the sheets not realising it would stop the groups from expanding / collapsing.
After a few google searches I found a needed a VBA code to make this work.

I have tried multiple codes that I have found online with some minor success. I have never used VBA's before so have no knowledge of how to structure the codes.
I am just providing my colleague with a blank layout and he will populate from there, copying the relevant worksheet depending on job role of the person he is adding.

Some of the issues I have come across with codes online are that they work fine when I have put them in but after closing and reopening they no longer work. I have also had some asking for a password when you open the workbook which isn't a suitable option.

Some of the worksheets do not need protecting and do not have groups I'm not sure if this makes any difference. I have un-selected locked on the cells I want my colleague to be able to enter data.
I would like to be able to expand and collapse groups in the protected worksheets.

Any help is much appreciated, I want to get this handed over so I have my weekends back.

Thanks,
Rebro88
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Tried a few more codes I found through google, can’t get them to work as I need.
can anyone help?
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top