Loop to skip some sheets in workbook
"witek" skrev i melding
...
Harald Staff wrote:
"witek" skrev i melding
...
If ws.Name = "X" Or ws.Name = "Y" Or ws.Name = "Z" Then
AND not OR
If ws.Name < "X" AND ws.Name < "Y" AND ws.Name < "Z"
No. A ws can not have three names at the same time so that test will
always
fail.
try what is value of ws.Name < "X" AND ws.Name < "Y" AND ws.Name < "Z"
if ws.Name = "T" .
Sorry, you're right. It stated "AND not OR", but not "< not =" , so I
misread it. But it leaves the question why this? Does it perform better than
the original, or than a Select Case, or three If's ?
|