Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??). Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect Password:="hi", userinterfaceonly:=True .EnableOutlining = True End With End Sub It needs to be reset each time you open the workbook. (excel doesn't remember it after closing the workbook.) (you could use the workbook_open even under ThisWorkbook, too.) Don't forget to lock the VBA Project, too. Else you'll have inquisitive types looking at your code and seeing the password. Inside the VBE, you can lock the project. Tools|VBAProject Properties|Protection tab. Give it a memorable password and lock the project for viewing. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm CiaraG wrote: Someone asked the question a number of weeks ago as to how to view grouped rows on a protected worksheet. A number of people replied by advising to enter VB buttons on the worksheet. Is there no way of allowing grouped rows to be automatically viewed by using VB code on the worksheet???? In the same way that a filter can still be enabled on a protected worksheet. I have a number of grouped rows on my worksheet that I would like the user to be able to view, if they wish. All ideas would be appreciated. Rgs, CG P.s. Happy Christmas!!! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I use the subtotal function while a worksheet is protected? | Excel Worksheet Functions | |||
How do I show or hide detail for a group in a protected worksheet | Excel Discussion (Misc queries) | |||
Tab Function in Protected Worksheet | Excel Discussion (Misc queries) | |||
Group Contraction/Expansion in Protected Worksheet | Excel Worksheet Functions | |||
How use group and ungroup functions while worksheet is protected | Excel Worksheet Functions |