Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Sheet Protection and XLA code

I am trying to unprotect a spreadsheet from some code in a workbook. Below
is the code:


ActiveWorkbook.Sheets("TRANSACTIONS")
. Unprotect strPassWord
€˜*** do stuff to worksheet
End with

This code is in a xla workbook.

If the code is called from the activeworkbook in a non save mode then it
works.

If the code is called from the Workbook.BeforeSave event then the code stops
with a protection error.
At this point, even in a debug mode, the sheet protection will not turn off.

Is there a known issue that prevents the activeworkbook sheet protection to
not be change during the before save event?

Any thoughts or work around?

Thanks in advance

--
Stewart Rogers
DataSort Software, L.C.
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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Sheet protection code conflicts with Pivot Table "auto refresh" KG Excel Discussion (Misc queries) 6 December 21st 05 11:16 PM
Sheet Protection and VBA Code TheRobsterUK Excel Discussion (Misc queries) 1 May 27th 05 05:18 PM
disabling the "view code" tab - sheet protection? neowok[_43_] Excel Programming 1 March 5th 04 02:48 PM
protection sheet and code ??? Linou[_4_] Excel Programming 0 October 29th 03 08:37 PM


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