Ciao..basta fare così:
codice:
If right(text1.text,1) <> "" And right(text1.text,1) = "a" 
or right(text1.text,1) = "b" Then
Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
Text1.SelStart = Len(Text1.Text)
In questo caso non vengono inserite le lettere "a" e "b".
Tutto nell'evento text1_change..

fammi sapere..

ciao