Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
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) |