Is there a quick way to see if a number contains a decimal point ?
The quicker the method the better as I will be doing a LOT of checking !
Cheers.
Is there a quick way to see if a number contains a decimal point ?
The quicker the method the better as I will be doing a LOT of checking !
Cheers.
VB Code:
Private Function IsDecimal(ByVal oValue As Variant) As Boolean Dim sValue As String sValue = CStr(oValue) IsDecimal = False ' Should really do extra checking here for the decimal speficier determined ' from the Locale API routines If IsNumeric(sValue) Then If InStr(1, oValue, ".") Then IsDecimal = True End If End If End Function
Code:IF int(MyNumber)<>MyNumber Then
'it have a desimalpoint
End if
Cheers Guys :)