Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default How To Find If The ActiveCell Is Protected

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 248
Default How To Find If The ActiveCell Is Protected

Try
If ActiveCell.Locked = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")
End If
--
Pl click the ''''Yes'''' button
(if you see it - don''''t worry if you don''''t),
if this answer was helpful.



"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default How To Find If The ActiveCell Is Protected

Try Activecell.Locked

If this post helps click Yes
---------------
Jacob Skaria


"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default How To Find If The ActiveCell Is Protected

Already tried! But Protection and locking is different. All the cells are
locked by default and the code won't proceed whether the sheet/cell is
protected or not.

"Sheeloo" wrote:

Try
If ActiveCell.Locked = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")
End If
--
Pl click the ''''Yes'''' button
(if you see it - don''''t worry if you don''''t),
if this answer was helpful.



"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default How To Find If The ActiveCell Is Protected

Protection and locking is different. All the cells are locked by default and
the code won't proceed whether the sheet/cell is protected or not.


"Jacob Skaria" wrote:

Try Activecell.Locked

If this post helps click Yes
---------------
Jacob Skaria


"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default How To Find If The ActiveCell Is Protected

Found It!

Correct code would be:
If ActiveSheet.ProtectContents = True And ActiveCell.Locked = True Then
MsgBox ("Cell Is Locked & Worksheet Is Protected.")
End If


"FARAZ QURESHI" wrote:

Already tried! But Protection and locking is different. All the cells are
locked by default and the code won't proceed whether the sheet/cell is
protected or not.

"Sheeloo" wrote:

Try
If ActiveCell.Locked = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")
End If
--
Pl click the ''''Yes'''' button
(if you see it - don''''t worry if you don''''t),
if this answer was helpful.



"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default How To Find If The ActiveCell Is Protected

Found It!

Correct code would be:
If ActiveSheet.ProtectContents = True And ActiveCell.Locked = True Then
MsgBox ("Cell Is Locked & Worksheet Is Protected.")
End If


"Jacob Skaria" wrote:

Try Activecell.Locked

If this post helps click Yes
---------------
Jacob Skaria


"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 248
Default How To Find If The ActiveCell Is Protected

Thanks...

"FARAZ QURESHI" wrote:

Found It!

Correct code would be:
If ActiveSheet.ProtectContents = True And ActiveCell.Locked = True Then
MsgBox ("Cell Is Locked & Worksheet Is Protected.")
End If


"FARAZ QURESHI" wrote:

Already tried! But Protection and locking is different. All the cells are
locked by default and the code won't proceed whether the sheet/cell is
protected or not.

"Sheeloo" wrote:

Try
If ActiveCell.Locked = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")
End If
--
Pl click the ''''Yes'''' button
(if you see it - don''''t worry if you don''''t),
if this answer was helpful.



"FARAZ QURESHI" wrote:

What would be the appropriate code for finding whether the active cell is
locked and protected?

Run-time error '438':
Object doesn't support this property or method

is being returned on the following piece:

If ActiveCell.Protected = True Then
MsgBox ("You can't change the contents of this Cell. It is locked &
protected.")

Help from you experts is sought!

Thanx in advance.

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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
Find text in a protected worksheet Ram Excel Discussion (Misc queries) 1 February 7th 07 03:26 AM
Find text in a protected worksheet Ram Excel Discussion (Misc queries) 0 February 7th 07 02:34 AM
Using FIND on a protected worksheet Hippy Excel Worksheet Functions 6 December 14th 06 03:56 PM
Find Protected Cells Q John Excel Worksheet Functions 7 December 9th 04 11:49 PM


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

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"