Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Cell Protect Lost

I have a worksheet where I block selection access to locked cells. This
works fine while users are working with the sheet. What I am finding is that
when the file is opened, selection access is now allowed although changing
the cell is still protected. This does not happen all the time. As a test,
I tried to access the locked cells BEFORE I saved the workbook and I could
not. A few hours later or minutes before this port I opened the workbook and
was able to select what should have been selection denied cells. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Cell Protect Lost

Did some more digging. Time has nothing to do with anything. I'll save the
protected sheet, close Excel, Open Excel and the workbook, and I can select
the cells that should be access blocked. It appears that upon opening the
workbook, the "Select Locked Cells" attribute is enabled. Anyone have any
idea why?

"Greg" wrote:

I have a worksheet where I block selection access to locked cells. This
works fine while users are working with the sheet. What I am finding is that
when the file is opened, selection access is now allowed although changing
the cell is still protected. This does not happen all the time. As a test,
I tried to access the locked cells BEFORE I saved the workbook and I could
not. A few hours later or minutes before this port I opened the workbook and
was able to select what should have been selection denied cells. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Cell Protect Lost

Yes! Finally I can help someone...

Greg, I had this same exact problem a while back and it was driving me nuts.
I used the following code to end the maddness. Modify to suit your needs,
though it should work as-is if you drop it into your general declarations.
Just go to the VB Editor, click on THIS WORKBOOK and paste the code in. It
seems like I had to save, close, and open it a few times, but it does kick in!

Damian Carrillo


Private Sub Workbook_Open()

UpdateLinks = xlUpdateLinksAlways
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:=""
ws.Protect AllowInsertingRows:=True
ws.Protect AllowSorting:=True
ws.Protect AllowFiltering:=True
ws.Protect AllowDeletingRows:=True
ws.EnableSelection = xlUnlockedCells
Next ws

End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Cell Protect Lost

Damian !!!

You Da' Man

"Damian" wrote:

Yes! Finally I can help someone...

Greg, I had this same exact problem a while back and it was driving me nuts.
I used the following code to end the maddness. Modify to suit your needs,
though it should work as-is if you drop it into your general declarations.
Just go to the VB Editor, click on THIS WORKBOOK and paste the code in. It
seems like I had to save, close, and open it a few times, but it does kick in!

Damian Carrillo


Private Sub Workbook_Open()

UpdateLinks = xlUpdateLinksAlways
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:=""
ws.Protect AllowInsertingRows:=True
ws.Protect AllowSorting:=True
ws.Protect AllowFiltering:=True
ws.Protect AllowDeletingRows:=True
ws.EnableSelection = xlUnlockedCells
Next ws

End Sub



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
How do I restore cell gridlines lost after coloring a cell? Alan R. Excel Discussion (Misc queries) 6 January 1st 12 02:13 AM
LOST IN A CELL??? Tom T[_2_] Excel Discussion (Misc queries) 3 March 13th 08 01:12 AM
Cell formatting changes lost garliceggs Excel Discussion (Misc queries) 0 August 25th 06 04:14 PM
How do I keep a running total of pounds lost and percentage lost angel5959 Excel Discussion (Misc queries) 4 January 26th 06 09:18 PM
lost my password (worksheet protect) Dan Winterton Excel Discussion (Misc queries) 1 January 18th 05 07:09 PM


All times are GMT +1. The time now is 03:12 AM.

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"