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: 69
Default ProtectSheet Options are un-checking after macro

Hello:
I have a spreadsheet (Excel 2003) where the first ten rows need to locked.
The remainder of rows (including an auto-filter header in row 11) are
unlocked. When i password protect the sheet, I check the options boxes that
would allow the user of the protected worksheet to do all of the following:
- Select Unlocked Cells
- SElect Locked Cells
- Format Cells
- Insert Rows
- Delete Rows
- Sort
- Use AutoFilter

This all works great until after I run a macro button. The macro itself
works and is pretty simple, but requires me to insert the following verbiage
at the beginning and end of the macro so that i can unprotect the sheet and
re-protect the sheet in order for the macro to work:
ActiveSheet.Unprotect Password:="StarWars"
ActiveSheet.Protect Password:="StarWars"

The macro performs basic operations involving auto-filter, custom-filters,
sort Ascending and inserting/deleting an X in a particular cell.

When the macro is done, however, it defaults all my protect sheet settings
back to the standard first two options and no longer allows the checkboxes I
had selected. Therefore, not letting the Sort Ascending (For example) be used
anymore.

Suggestions?
Much appreciated!


 
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
Are Error-Checking rules (in Excel Options) workbook-specific? JoeM Excel Discussion (Misc queries) 7 May 4th 08 01:30 AM
Checking macro merry_fay Excel Discussion (Misc queries) 4 December 12th 07 04:42 PM
Error Checking Options - 2000-2003 brianbishop Excel Discussion (Misc queries) 1 August 11th 06 09:33 PM
VBA in Excel, Know a way to disable SORT without protectsheet? zulfer7 Excel Discussion (Misc queries) 2 June 23rd 06 06:18 PM
spell checking options dvs_47 Excel Worksheet Functions 2 March 6th 06 09:16 PM


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