Private Sub txtcom_0_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcom_0.KeyPress If (Not IsNumeric(e.KeyChar)) And (Asc(e.KeyChar) <> 8) Then e.Handled = True End If End Sub