LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2003 changes protection when saving

I have an Excel workbook with 9 worksheets on which I run a number of macros
saved with the workbook (not external). These are run in response to a
button click.

I have been applying protection to all the sheets in this workbook since it
will be used by people that don't know what they are doing in Excel. When
applying protection I only select (check) the 'Select Unlocked Cells' option
after which everything is properly locked up except for the unlocked cells.

Since the worksheets are protected so that the user can only access the
unlocked cells the macros must unlock the sheets to perform some of the
functions and then relock the sheets before the user gets control again.

The code is generally as follows...

Sheets("1st Quarter").Select
ActiveSheet.Unprotect
....
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Everything works properly during any given session. That is: After running
the macros the appropriate cells are locked and the unlocked cells are still
accessable.

However, after saving the file then reopening it the protection now has the
'Select Locked Cells' option selected as well.

If I set the protection by hand and save the workbook, close it and reopen
it everything is fine. If I make some changes that do not involve running
the macros, save, unload and reload everything is still fine.

Something happens after running the macros (any of them that unprotect then
reprotect a sheet) that causes Excel to behave correctly during the session
but to change the protection on all pages that had protection turned off/on
by the macros.

Any help on this would be greatly appreciated! TIA

Mark


 
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
protection on excel 2003 Ch. G. Excel Discussion (Misc queries) 0 November 4th 09 09:51 PM
PROTECTION Excel 2003 mariekek5 Excel Discussion (Misc queries) 3 June 15th 09 03:37 PM
Excel 2003: Protection oceanmist Excel Discussion (Misc queries) 1 June 19th 07 09:26 PM
Excel 2003: Protection oceanmist Excel Discussion (Misc queries) 1 September 20th 06 10:36 PM
protection in excel 2003 rameshpm Excel Discussion (Misc queries) 1 June 27th 06 01:04 PM


All times are GMT +1. The time now is 06:54 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"