Code:
Dim A, Z As String
Dim MyDecimal, LessThanOne, SevenDigits As String
A = Format((Y), "0000000000000.00")
Dim B As Single
B = Val(A) - Int(Val(A))
Dim A1, D1, DecimalValue As Integer
LessThanOne = Int(Y)
DecimalValue = Round(B * 100, 2) Mod 100
A1 = Val(Right(DecimalValue, 1))
B1 = Val(Left(DecimalValue, 1))
When input value for 1 to max 99,999,999.99, the result is producing CORRECT.
But when input value a between 999,999,999.01 and 999,999,999.06 it giving decimal value wrong. After .07 the result is coming correct.
Please help