Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2004

Tip: Looking for answers? Try searching our database.

Protectected cell ignore

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony Byrne - 31 Jul 2004 10:27 GMT
How do I prevent the warning message appearing when trying to alter a protected cell.
Dave Peterson - 31 Jul 2004 13:03 GMT
You could have a macro that does the protecting--put it in your auto_open
or workbook_open event:

Option Explicit
Sub auto_open()
   With Worksheets("sheet1")
       .Protect Password:="hi"
       .EnableSelection = xlUnlockedCells
   End With
End Sub

Excel won't remember this setting after you close it and reopen the workbook
(that's why it's in auto_open).

> How do I prevent the warning message appearing when trying to alter a protected cell.

Signature

Dave Peterson
ec35720@msn.com

Anthony Byrne - 31 Jul 2004 15:53 GMT
Thank you Dave but all I really want to do is stop the warning message. I do not want to alter the protected cell.

> You could have a macro that does the protecting--put it in your auto_open
> or workbook_open event:
[quoted text clipped - 11 lines]
>
> > How do I prevent the warning message appearing when trying to alter a protected cell.
Anthony Byrne - 31 Jul 2004 17:01 GMT
Thank you, but all I want is to prevent the message. I do not really want to gain access to the cell.

> You could have a macro that does the protecting--put it in your auto_open
> or workbook_open event:
[quoted text clipped - 11 lines]
>
> > How do I prevent the warning message appearing when trying to alter a protected cell.
Anthony Byrne - 31 Jul 2004 17:07 GMT
Thank you. All I really want is for the warning message to be cancelled. In other words if someone wants to change a protected cell, nothing happens

I do not want to change the contents of a protected cell.

> You could have a macro that does the protecting--put it in your auto_open
> or workbook_open event:
[quoted text clipped - 11 lines]
>
> > How do I prevent the warning message appearing when trying to alter a protected cell.
Dave Peterson - 31 Jul 2004 23:33 GMT
You can't intercept this message, but you can stop the user from selecting a
cell that could cause the message to pop up (if they tried to change it).

This line:
.EnableSelection = xlUnlockedCells
limits the cells the users can click on.  Hence, the warning message won't
appear.

(This won't allow a user to change a locked cell on a protected worksheet.)

==
But as an aside, worksheet protection inside excel is very weak.  

From J.E. McGimpsey's site:
http://www.mcgimpsey.com/excel/removepwords.html

> Thank you. All I really want is for the warning message to be cancelled. In other words if someone wants to change a protected cell, nothing happens
>
[quoted text clipped - 20 lines]
> > Dave Peterson
> > ec35720@msn.com

Signature

Dave Peterson
ec35720@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.