Simple macro to hide and show detail - Grouped Rows

J

John

Im sure this should be simple however I cant find the answer:

I have a spreadsheet that has been developed for a number of users.
The spreadsheet is protected however I want to alow the users to show
and hide grouped rows without unprotecting the worksheet. There dosnt
appear to be an option to allow this when protecting the sheet.

So i decided to create a simple macro that unprotects the worksheet
selects the appropriate cell then expands the grouping to show the
detail then re protects the worksheet.

If I record the macro the show detail part of the process is not
recorded. Can anyone tell me what the VBA code is to show and hide
detail.
 
V

Vergel Adriano

Try setting the ShowDetail property to True or False...

something like this if it's grouped by rows:

ActiveSheet.Range("A1").EntireRow.ShowDetail = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top