It is not possible that if you have a variable lResult and you have a statement like lResult = ... nothing happens with lResult. So if it's still 3, the selection index is 3.