Check if value is decimal

Submitted by:Jhon Brain

Date added:04 February, 2013

Category:Visual Basic

Visual Basic code to check if value is decimal.

Tags: decimal

Code Snippet:

Function isDecimal(ByVal i As Variant) As Boolean
isDecimal = False
parts = Split(i, ".")
If (UBound(parts) - LBound(parts) + 1) > 1 Then
If parts(1) > 0 Then
isDecimal = True
End If
End If
End Function
 
 

Comments