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: 413
Default Unprotect not working

I'm in a loop opening each workbook in turn, and with each book
I state:
For Each ws In ActiveWorkbook.Worksheets
With ws
.Unprotect
'Find which type of BofQ we are dealing with, and in which
'column the '£' is found.
For Each C In Range("A1:Z100")
If C.Value = SEARCHFOR Then
£Col = C.Column
Exit For
End If
Next
'Get the page 'identifiers' for this sheet
ReDim Pagevarr(1 To 1)
Set rng = Columns(1).SpecialCells(xlConstants, xlTextValues)

The code is failing on this last line, with the error message saying that I
cannot use the Set statement on a protected worksheet.
Why is .Unprotect not working here please?

Have half an idea that selecting the sheet might solve this. If so, can I
avoid the use of Select?

Regards.




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004


 
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
How do I unprotect a spreadsheet? Sofiya Excel Worksheet Functions 1 October 13th 08 04:30 PM
unprotect a worksheet shelly Excel Worksheet Functions 3 December 19th 07 12:37 AM
Unprotect worksheet via VBA Mike Echo Excel Worksheet Functions 2 March 19th 06 04:52 AM
Unprotect Conditional Formatting Excel Discussion (Misc queries) 3 September 5th 05 02:49 PM
Unprotect Sheets Karen Excel Worksheet Functions 3 March 21st 05 02:31 PM


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