Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook which has grouping on certain sheets, i want the workbook
to protect itself everytime a user closes it. The problem i'm having is that when the workbook is opened the sheets are protected but the user cannot expand the groups. I have written the code below Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim sht as Workbooksheet For Each sht In ActiveWorkbook.Worksheets sht.Activate With Worksheets(ActiveSheet) .Protect Password:="pwd", Contents:=True, UserInterfaceOnly:=True .EnableOutlining = True End With Next sht End sub I'm sure its something simple that i'm doing wrong, can someone please help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Enable hyperlinks in protected sheet | Setting up and Configuration of Excel | |||
how to enable a macro in protected sheet | Excel Discussion (Misc queries) | |||
Enable Auto Filters in protected sheet | Excel Programming | |||
Enable Auto Filters in protected sheet | Excel Programming | |||
How to enable grouping in a protected sheet | Excel Worksheet Functions |