Grouping Function on protected sheet

  • Thread starter Thread starter vivi
  • Start date Start date
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
 
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!!
 
Back
Top