S
Stuart
I have recently restructured code in a routine and within the
new code, now have added a check for sheets to exclude:
For Each ws In ActiveWorkbook.Worksheets
If Not (ws.Name Like "DataStore" Or ws.Name Like "*Architect's
Instructions*" Or _
ws.Name Like "*Variations*" Or ws.Name Like "*Materials*" Or ws.Name
Like _
"*Preliminaries*" Or ws.Name Like "*Summary*" Or ws.Name Like _
"*SUMMARY*" Or ws.Name Like "*MASTER*") Then
With ws
'Find which type of BofQ we are dealing with, and in which column the
'£'
'is found. NB: This routine assumes that '£' will always occur in the
last
'but one column
' .Select
For Each C In Range("A1:Z100")
If C.Value = SEARCHFOR Then
£Col = C.Column
Exit For
End If
Next
End With
End If
Next
After adding the exclude sheet code, I found that £Col was equal to 0, even
when it should have been a different value, and even when Locals showed 'ws'
working with a 'valid' sheet.
So I added ...'.Select'
Now it 'appears' to work. ............why is this, please?
Regards.
(unqualified..again?)
new code, now have added a check for sheets to exclude:
For Each ws In ActiveWorkbook.Worksheets
If Not (ws.Name Like "DataStore" Or ws.Name Like "*Architect's
Instructions*" Or _
ws.Name Like "*Variations*" Or ws.Name Like "*Materials*" Or ws.Name
Like _
"*Preliminaries*" Or ws.Name Like "*Summary*" Or ws.Name Like _
"*SUMMARY*" Or ws.Name Like "*MASTER*") Then
With ws
'Find which type of BofQ we are dealing with, and in which column the
'£'
'is found. NB: This routine assumes that '£' will always occur in the
last
'but one column
' .Select
For Each C In Range("A1:Z100")
If C.Value = SEARCHFOR Then
£Col = C.Column
Exit For
End If
Next
End With
End If
Next
After adding the exclude sheet code, I found that £Col was equal to 0, even
when it should have been a different value, and even when Locals showed 'ws'
working with a 'valid' sheet.
So I added ...'.Select'
Now it 'appears' to work. ............why is this, please?
Regards.
(unqualified..again?)