How to keep decimal values while converting string variable into Integer

Hello,

I am trying to convert String variable into Integer to make addition of Numbers. But after converting it decimal number removed from integer variable. How I can keep value as it is and make addition.

String Variable1 - 11895.64
String Variable2 - 395.26

I am using Int=CInt(String_Variable1) to convert it into Integer.
Integer become Int = 11896

Integer by definition do not have decimal places. You’ll need to use variable type System.Double and CDbl(YourStringVar) instead.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.