Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default How do you trap the worksheet unprotect?

I needs to detect if a workbook has had any worksheets unprotected.
My expectation is to have a document property set to "unchanged" with
worksheets protected when saved. I then send out the workbook to my
customers. If they unprotect any worksheet, the document property gets set to
"modified". This way I can detect if they potentially modified some of the
equations, etc..

Any suggestions?

Thanks,
- Pat
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default How do you trap the worksheet unprotect?

Unprotecting a sheet is not an event that is captured in XL. If I were doing
it I would do the following. On each sheet create a named range which
includes all of the cells that you do not want modified. Make it a local
named range (specific to the sheet and not the entire workbook) and use the
same name like "Formulas" on each sheet.

Now you can use the SheetChange event in this workbook and see if the target
intersects with the named range. If it does then you know one or more of your
formulas have been modified.
--
HTH...

Jim Thomlinson


"Dreiding" wrote:

I needs to detect if a workbook has had any worksheets unprotected.
My expectation is to have a document property set to "unchanged" with
worksheets protected when saved. I then send out the workbook to my
customers. If they unprotect any worksheet, the document property gets set to
"modified". This way I can detect if they potentially modified some of the
equations, etc..

Any suggestions?

Thanks,
- Pat

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default How do you trap the worksheet unprotect?

To bad "unprotecting" can't be trapped. Your suggestion is a challenge for
me to implement. Is there a way I can select all the "locked" cells and make
than all part of a named range? Can this be done at the workbook level (one
range for all locked cells in the workbook?). I'll accept something by
worksheet if I can.

Thanks,
- Pat

"Jim Thomlinson" wrote:

Unprotecting a sheet is not an event that is captured in XL. If I were doing
it I would do the following. On each sheet create a named range which
includes all of the cells that you do not want modified. Make it a local
named range (specific to the sheet and not the entire workbook) and use the
same name like "Formulas" on each sheet.

Now you can use the SheetChange event in this workbook and see if the target
intersects with the named range. If it does then you know one or more of your
formulas have been modified.
--
HTH...

Jim Thomlinson


"Dreiding" wrote:

I needs to detect if a workbook has had any worksheets unprotected.
My expectation is to have a document property set to "unchanged" with
worksheets protected when saved. I then send out the workbook to my
customers. If they unprotect any worksheet, the document property gets set to
"modified". This way I can detect if they potentially modified some of the
equations, etc..

Any suggestions?

Thanks,
- Pat

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default How do you trap the worksheet unprotect?

The solution I choose is based on the cells protected property. I set all
the cells to be protected except those I all the user to edit. If one of the
modified cells has the protected property set, I know the user unprotected
the worksheet. Easy to implement!

Thanks for help!
- Pat



"Jim Thomlinson" wrote:

Unprotecting a sheet is not an event that is captured in XL. If I were doing
it I would do the following. On each sheet create a named range which
includes all of the cells that you do not want modified. Make it a local
named range (specific to the sheet and not the entire workbook) and use the
same name like "Formulas" on each sheet.

Now you can use the SheetChange event in this workbook and see if the target
intersects with the named range. If it does then you know one or more of your
formulas have been modified.
--
HTH...

Jim Thomlinson


"Dreiding" wrote:

I needs to detect if a workbook has had any worksheets unprotected.
My expectation is to have a document property set to "unchanged" with
worksheets protected when saved. I then send out the workbook to my
customers. If they unprotect any worksheet, the document property gets set to
"modified". This way I can detect if they potentially modified some of the
equations, etc..

Any suggestions?

Thanks,
- Pat

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
Unprotect a worksheet Mayumdwl Excel Worksheet Functions 1 April 21st 09 12:30 AM
Foolproof way to trap Worksheet Change? Nick Excel Programming 5 September 19th 06 07:50 PM
Unprotect a worksheet FRAZZLED New Users to Excel 0 May 30th 06 05:06 PM
Unprotect a worksheet Bryan Excel Discussion (Misc queries) 11 April 14th 06 02:42 AM
unprotect worksheet Richard Sanchez Excel Programming 1 July 17th 04 01:26 AM


All times are GMT +1. The time now is 05:18 PM.

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"