LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Protect sheet while enabling outlines and custom views

This approach seems unstable, particularly since my workflow depends
heavily on custom views, which don't seem to do well with protection.
I think my best bet will be to go with an unprotected workbook, but
detect when a user tries to select a member of a Named Range. I would
send him to cell A1. In this case, here's what I'm trying to do, but
it doesn't work ...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("AGRegionsProtected").Address Then
ActiveCell = Range("A1").Select
End Sub

As a secondary concern, I'd also like to have a pop-up explain what is
going on. I could use this code:
MsgBox "This area is automatically calculated and should not be
altered.", vbCritical, Error

As a completely different approach, setting the scroll area to exclude
the range I want to protect (in this case, AGRegionsProtected), may
work.

This is difficult since the workbook must be shared, I have outlines
and custom views ... all in one.

TIA,
ML.


Dave Peterson wrote in message ...
Your code will look something like:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub


But since you don't want to change protection, you can comment that line out by
putting an apostrophe in front of it:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
' .Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

Try it and see what happens--but don't get your hopes up.
[snip]

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I protect/lock columns AND set custom views? Meltad Excel Discussion (Misc queries) 0 July 31st 06 04:03 PM
how do I protect cells in custom views? Tom Clement Excel Discussion (Misc queries) 0 December 16th 05 08:48 PM
Custom views, filters sensitive, in a share workbook an protect sh Andre Fernandes New Users to Excel 0 October 31st 05 09:36 PM
PROTECT SHEET AND SEE MY CUSTOM VIEWS LIVE SANDY Excel Worksheet Functions 0 September 21st 05 11:44 PM
How to password protect hidden columns and custom views in Excel blade444 Excel Discussion (Misc queries) 2 July 29th 05 01:36 PM


All times are GMT +1. The time now is 04:57 PM.

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"