Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I posted this question a month ago but nobody seems to know an answer to the problem. I haven't been able to find a workaround so I would deeply appreciate if anyone has ANY idea concerning my problem which is as follows: I'm using outlines in an Excel 2000 spreadsheet. The problem is that some parts of the worksheet have to be protected so clicking the outline symbols (+/- or 1|2) will result in an error. I therefore, somehow, would need to unprotect the workbook before the expand/collapse event is triggered and thereafter reprotect it. The problem is that there is no BeforeExpand/collapse event, none that I could find anyways. 1. Can this be solved using standard VBA? 2. or if not - is there a API-function(s) I can use? TIA PO |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi PO
Read this from Dave Peterson If you protect the worksheet with code, you can do more things: Add this to a general module: 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.) If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Ron de Bruin http://www.rondebruin.nl "PO" <po wrote in message ... Hi I posted this question a month ago but nobody seems to know an answer to the problem. I haven't been able to find a workaround so I would deeply appreciate if anyone has ANY idea concerning my problem which is as follows: I'm using outlines in an Excel 2000 spreadsheet. The problem is that some parts of the worksheet have to be protected so clicking the outline symbols (+/- or 1|2) will result in an error. I therefore, somehow, would need to unprotect the workbook before the expand/collapse event is triggered and thereafter reprotect it. The problem is that there is no BeforeExpand/collapse event, none that I could find anyways. 1. Can this be solved using standard VBA? 2. or if not - is there a API-function(s) I can use? TIA PO |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|