PC Review


Reply
Thread Tools Rate Thread

Is active cell editable?

 
 
XP
Guest
Posts: n/a
 
      29th Oct 2008
Using Office 2007 with Win XP;

I need to determine if the active cell is currently in an editable state. I
guess that really translates into whether or not it is locked AND sheet
protection is turned on? Is this all that needs to be tested?

Does anyone have efficient example code that might return true if
editable/false if not? If so, could you please post?

Thanks much in advance.
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      29th Oct 2008
Hi,

Try this. the message boxes are just for demonstration

Sub sonic()
If ActiveSheet.ProtectContents And ActiveCell.Locked Then
MsgBox "Locked"
Else
MsgBox "Unlocked"
End If

End Sub
Mike

"XP" wrote:

> Using Office 2007 with Win XP;
>
> I need to determine if the active cell is currently in an editable state. I
> guess that really translates into whether or not it is locked AND sheet
> protection is turned on? Is this all that needs to be tested?
>
> Does anyone have efficient example code that might return true if
> editable/false if not? If so, could you please post?
>
> Thanks much in advance.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
editable cell in a dropdown list Nelson Noel Microsoft Excel Worksheet Functions 1 21st Feb 2009 05:46 PM
How to make cell not editable basavaraj.janayi@gmail.com Microsoft Excel Worksheet Functions 1 6th Aug 2007 09:11 AM
Make a cell editable Samuel Shulman Microsoft VB .NET 1 27th Jul 2006 09:58 PM
DataGridView Cell editable TR Microsoft Dot NET Framework Forms 0 23rd May 2006 12:13 PM
Cell is locked but still editable... nogatomer@gmail.com Microsoft Excel Programming 2 30th Mar 2006 02:00 PM


Features
 

Advertising
 

Newsgroups
 


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