Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
unprotected cells
hi,
i would like to know if there is a way to protect a sheet so that most of the cells are protected, but column d is unprotected. i am asking this because for some reason on worksheet selection change, if i click somewhere else in the sheet, or even select a range other than what is in the A_range defined name range, i get a "type mismatch" error message. here is the code i have: if not intersect(target, range("A_range")) is nothing and range(target.address).value < "" then dim... thanks in advance, geebee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
unprotected cells
M aybe hadle it differently by making the second part if the If ...And
statement into a nested If if not intersect(target, range("A_range")) is nothing Then If range(target.address).value < "" then 'other code End If End If that way the second part will be evaluated on.y if the first part is true. As it is currently written, the first part can be false but it will attempt to evaluate the And part anyhow. "geebee" (noSPAMs) wrote in message ... hi, i would like to know if there is a way to protect a sheet so that most of the cells are protected, but column d is unprotected. i am asking this because for some reason on worksheet selection change, if i click somewhere else in the sheet, or even select a range other than what is in the A_range defined name range, i get a "type mismatch" error message. here is the code i have: if not intersect(target, range("A_range")) is nothing and range(target.address).value < "" then dim... thanks in advance, geebee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
unprotected cells
geebee-
You didn't mention which version of Excel you are using; this works for me in XL2003. Rightclick on the column, format cells/protection, then uncheck the "locked" box. Then protect the sheet (allow users to select unlocked cells, but not locked cells). Now you and your users can select cells in that column only. HTH, Keith "geebee" wrote: hi, i would like to know if there is a way to protect a sheet so that most of the cells are protected, but column d is unprotected. i am asking this because for some reason on worksheet selection change, if i click somewhere else in the sheet, or even select a range other than what is in the A_range defined name range, i get a "type mismatch" error message. here is the code i have: if not intersect(target, range("A_range")) is nothing and range(target.address).value < "" then dim... thanks in advance, geebee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unprotected cells | Excel Worksheet Functions | |||
clear contents cells of unprotected cells | Excel Programming | |||
Unprotected cells becoming protected | Excel Programming | |||
tab between unprotected cells | Excel Discussion (Misc queries) | |||
put zero value to unprotected cells | Excel Programming |