Não entendi, pois o código está no evento KeyPress (tecla precionada), se não "escrever" nada não gera o evento.
Dependendo da configuração de seu form, experimente, por exemplo, adicionar o if .. no evento Exit do textbox.
Postado : 21/03/2014 6:59 pm