Grouping Function on protected sheet

V

vivi

Hi there

I've managed to put a code to allow group and ungroup in my workbook using
the following code at thisworkbook module.

However, I can't figure out how to allow user to choose grouping/ungrouping
their ranges.

Does anyone know how to incorporate this functionality in my vba code please?

I want this to be set so it will allow automatically and preferrably
adapting the same code as the one below. This is because the workbook is a
template for my project department and will be used by different users and
different projects.

Please help me!!

Thanks

Vivi
 
V

vivi

Sorry here is the code:


Private Sub grouping()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws
..Protect Password:="finance", userinterfaceonly:=True
..EnableOutlining = True
..EnableAutoFilter = True
End With
Next ws
End Sub


Thanks a lot!!
 

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