If it is formatexception, then it may be on line "FIRSTNUM = Double.Parse(textBox9.Text);"
you better debug your programme and find exactly which line this error occured..
If it is on above line then you can find why this exception came, read the documentation for
Double.Parse[
^] it clearly say if input is not represent a number in a valid format then you get this exception. Add few validations like empty value check and also you can use
Double.TryParse Method[
^] instead.