S
Stuart
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.
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.