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

You could hide the names--it can be done in code, but even better, get a copy
of Jan Karel Pieterse's (with Charles Williams and Matthew Henson) utility
"Name Manager.xla" from http://www.bmsltd.co.uk/mvp/
(or http://www.bmsltd.ie/mvp/)

There's a button that allows you to hide the name. (It makes it more difficult
for the average user to screw up your design.)

Debra Dalgleish has a page for books:
http://www.contextures.com/xlbooks.html
(John Walkenbach's book is very nice)

From a previous post about Dimming and "option explicit" which go hand in glove.

And if you use "option explicit" and dim your variables appropriately, then you
can get the VBE's intellisense to pop up for you. (Less wear and tear on the
memory!)

Try this in a test module:

Option explicit
sub testme()
Dim Wks as worksheet
'now type wks. (as soon as you hit that dot, you should see some valid choices
for what you can do to a worksheet (or a property of the worksheet that you can
examine).

This is very nice to us older folks.

And by forcing you to declare your variables, you don't have to spend hours
looking for the mistake in this code:

for xlctr = 1 to 5
msgbox x1ctr
next xlctr

(the one's and ell's are mixed up).

You would have gotten an error when you tried to compile.

And this is nice to us older folks with bifocals!

wrote:

Again, thanks much, Dave. I think that the bottom of my previous post
got clipped. I had a couple questions:

The only other thing I'm going to try to figure out is how to disable
editing/deleting (tampering with) my defined name ranges. There's got
to be a way to disable that on workbookopen; I'm open to tips.

P.S. Is there a good place I can reference for definitions? For
example, I see lots of folks start their code with Dim, but I don't
know what it is and can't seem to find anywhere that defines it.

R/
Michael.

Dave Peterson wrote in message ...
You could combine ranges:

Dim myRng1 As Range
Dim myRng2 As Range

Set myRng1 = Me.Range("AGRegionsProtected1")
Set myRng2 = Me.Range("AGRegionsProtected2")

If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Union(myRng1, myRng2)) Is Nothing Then Exit Sub


==
You could even define a third range manually that's the combination of both of
these ranges:

Insert|range|define
Names in workbook:
AGRegionsProtectedAll

Refers to:
=AGRegionsProtected1,AGRegionsProtected2

You won't see it in the namebox dropdown, but you can type it in and select the
combined range.



[snip]


--

Dave Peterson

 
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 07:49 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"