How do I convert from a string to an integer in Visual Basic?
Use This is assuming VB.NET. Judging by the name “txtPrice”, you really don’t want an Integer but a Decimal. So instead use: If this is the case, be sure whatever you assign this to is Decimal not an Integer.