Hi, 2nd post of the day
I am using a macro to allow users to expand and close grouped columns when the sheet is protected, and its works fine UNTIL I save, close it and go back in. When back in the workbook is locked (that's what I want), but when I try to expand the grouped columns it says "you cannot use this command in a protected sheet....". If I then go into the macro, press play and go back to the sheet it then works fine in protected mode. is there an addition to my code to make it run automatically so it works as soon as the sheet is open?
Private Sub Workbook_Open()
With Worksheets("Master Sheet")
.Protect Password:="password", Userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub
Thanks in advance,
I am using a macro to allow users to expand and close grouped columns when the sheet is protected, and its works fine UNTIL I save, close it and go back in. When back in the workbook is locked (that's what I want), but when I try to expand the grouped columns it says "you cannot use this command in a protected sheet....". If I then go into the macro, press play and go back to the sheet it then works fine in protected mode. is there an addition to my code to make it run automatically so it works as soon as the sheet is open?
Private Sub Workbook_Open()
With Worksheets("Master Sheet")
.Protect Password:="password", Userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub
Thanks in advance,