ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem using outlines (https://www.excelbanter.com/excel-programming/295157-problem-using-outlines.html)

PO

Problem using outlines
 
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) won't work. 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



BrianB

Problem using outlines
 
1. You need to unprotect and re-protect as you suggest. I suggest yo
record macros of your various expand/collapse requirements and supply
method via a custom dialog box or buttons to run them. You can make
custom toolbar, attach it to a workbook and save and close. Deletin
the toolbar will then make it only available with that workbook.

2. API calls will have no application in this context because you
requirements apply to Excel, rather than to the general Windows system

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com