#1   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default HELP!!!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default HELP!!!

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"