I am entering only numbers with decimal points/values in a TEXTBOX on the VB form. I need to get only the decimal values.

How can I? Please help me as I tried in this way (for 2 Decimal places)

Expand|Select|Wrap|Line Numbers

- VB6
- Dim x As Double
- Dim dc As Integer, dcStr As String
- x = Val(Text1.Text)
- dc = InStr(x, ".")
- If dc > 0 Then
- dcStr = Left(Mid(Text1.Text, dc + 1) & "00", 2)
- End If