Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default XL 2007 VBA not recognizing .ProtectContents properly

2003/2007

Below is a VBA snippet that worked fine in 2003.

With 2007, the code below does not consistently sensing if
wks.ProtectContents = True, therefore,
wks.Unprotect Password:="12345678" is bypassed.

Any thoughts or workarounds?

EagleOne

For Each wks In MyPreviousWorkBook.Worksheets
wks.Activate
If wks.ProtectContents = True Then
wks.Unprotect Password:="12345678"
End If
Next wks
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
PAGE PREVIEW NOT WORKING PROPERLY IN EXCEL 2007 Scott Dixon Excel Worksheet Functions 0 July 4th 06 03:52 PM
Formulas not recognizing new data malakingaso Excel Discussion (Misc queries) 1 February 8th 06 07:27 PM
Vlookup not recognizing field goeppngr Excel Worksheet Functions 3 January 27th 06 09:15 PM
Recognizing #N/A nebb Excel Worksheet Functions 1 October 19th 05 12:56 AM
Excel not recognizing Dates properly. Dan Excel Discussion (Misc queries) 1 March 23rd 05 07:19 PM


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