Decimal Values

Hi Team,

I am multiplying 2 string values say 16.4 * 1.

Since its a string value i am assign my code is

I am storing this output in a double variable.
Expected output : 16.4
Actual Output is : 17

Help needed.


Can you try CDbl instead of CInt?


This is because you are converting to integer at the first place.
CInt will convert string to integer. In case of float the value will be converted to rounded value.
Instead of CInt , use CDbl for converting decimal values.

Thank you guys working fine.

1 Like