Like I said, trying to convert an empty string to a number will throw an exception. This is almost certainly what is happening in your case. You need to validate the string to make sure it represents a valid number. You might look into the Double.TryParse method. I would recommend making the changes to use NumericUpDowns, though. In my opinion, they should always be used where they can and only resort to a TextBox if there is some specific reason to. There are valid reasons to use TextBoxes for numerical input, but this usually relates to variable numbers of decimal places. If you're using Integers then the NumericUpDown is usually better. Let's say you are switching from TextBox1 to NumericUpDown1. You can simply do a Find and Replace to switch "TextBox1.Text" to "NumericUpDown1.Value".