Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I protect/lock columns AND set custom views? | Excel Discussion (Misc queries) | |||
how do I protect cells in custom views? | Excel Discussion (Misc queries) | |||
Custom views, filters sensitive, in a share workbook an protect sh | New Users to Excel | |||
PROTECT SHEET AND SEE MY CUSTOM VIEWS | Excel Worksheet Functions | |||
How to password protect hidden columns and custom views in Excel | Excel Discussion (Misc queries) |