Why do I get an error in this code???
WB is an object, so use
Set WB = ThisWorkbook
HTH,
Bernie
MS Excel MVP
"Charlotte E." wrote in message ...
Why do I get an error in the third line of this little code:
Dim WS As Worksheet
Dim WB As Workbook
WB = ThisWorkbook
For Each WS In WB.Worksheets
????
|