Link to home
Start Free TrialLog in
Avatar of joyacv2
joyacv2Flag for Puerto Rico

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!
SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joyacv2

ASKER

Hi,

It's works perfect, but did you know why my line of code doesn't work?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial