Select appropriate tab