Private Sub NumericTextBox_KeyPress(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress Dim KeyAscii As Integer KeyAscii = Asc(e.KeyChar) Select Case KeyAscii Case 48 To 57, 8, 13 ' these are the digits 0-9, backspace, ' and carriage return ' we're OK on these, don't do anything Case 45 ' minus sign ' The number can only have one minus sign, so ' if we already have one, throw this one away If InStr(Me.Text, "-") <> 0 Then KeyAscii = 0 End If ' if the insertion point is not sitting at zero ' (which is the beginning of the field), throw away the minus ' sign (because it's not valid except in first position) If Me.SelectionStart <> 0 Then KeyAscii = 0 End If Case 46 ' this is a period (decimal point) ' if we already have a period, throw it away If InStr(Me.Text, ".") <> 0 Then KeyAscii = 0 End If Case Else ' provide no handling for the other keys KeyAscii = 0 End Select ' If we want to throw the keystroke away, then set the event ' as already handled. Otherwise, let the keystroke be handled normally. If KeyAscii = 0 Then e.Handled = True Else e.Handled = False End If End Sub>Hi all,