Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default 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
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
Unprotected cells Mainer Excel Worksheet Functions 2 October 13th 09 02:37 AM
clear contents cells of unprotected cells Ed Excel Programming 6 January 12th 06 06:09 PM
Unprotected cells becoming protected TomV Excel Programming 0 November 30th 05 01:42 PM
tab between unprotected cells LesaT Excel Discussion (Misc queries) 1 November 3rd 05 11:30 PM
put zero value to unprotected cells GUS Excel Programming 2 September 14th 03 10:54 PM


All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"