Dim n As IntegerPrivate Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then n = 0 Dim s As String s = Text1.Text For i = 1 To Len(s) If Val(Mid(s, i, 1)) Mod 2 <> 0 Then n = n + 1 End If Next i Text2.Text = n End IfEnd Sub