LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 127
Default Losing Cell Protection When Saving Workbook

Excel 2003. I programmatically protect each sheet in a workbook as I
programmatically create the sheets. Moreover, I enable only the unlocked
cells in the sheets to be selected. I use:

WkSh.Protect
WkSh.EnableSelection = xlUnlockedCells

When I put breakpoints in while debugging I find that the protection is
working as expected (the sheet is protected and I can only select unlocked
cells).

When I am finished creating all the sheets, I then programmatically protect
the whole work book as:

WbNew.Protect

When I check the sheets after this operation, they still behave as desired.
HOWEVER, when I save the workbook using:

WbNew.Close SaveChanges:=True

and then open the workbook, I find the workbook protected (as expected), the
sheets protected (as expected), but I can select the locked cells in the
sheets

What could be causing this? Thanks for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
 
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 copy cell workbook to workbook? [email protected] Excel Discussion (Misc queries) 6 October 21st 05 03:15 PM
How do I copy a cell + it's formula from one workbook to another? excel _ help for the hopeless, please Excel Discussion (Misc queries) 4 October 11th 05 11:48 PM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 01:14 AM.

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"