joyacv2
asked on
ERROR IN ELSEIF STATEMENT
Hi,
I have a code that verifies the index of a sheet. In this case, the index is 4 and the sheet name is SN 300-3
i have the following line:
ElseIf sht.Index > 3 And InStr(1, sht.Name, "-") And InStr(1, sht.Name, "SN") then
and returns false. I don't know why is happening? I test the statement individually and works well but when i mix the three doesn't work! Only works two by two!
I have a code that verifies the index of a sheet. In this case, the index is 4 and the sheet name is SN 300-3
i have the following line:
ElseIf sht.Index > 3 And InStr(1, sht.Name, "-") And InStr(1, sht.Name, "SN") then
and returns false. I don't know why is happening? I test the statement individually and works well but when i mix the three doesn't work! Only works two by two!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's works perfect, but did you know why my line of code doesn't work?