Private Sub Text1_KeyPress(KeyAscii As Integer) Dim Letter As String Letter = Chr(KeyAscii) If Not (Letter Like "[0-9.]") Then KeyAscii = 0 End If End Sub