I originally had it that way round and I tried to get a friend to help me and he advised me to flip and see if that helps.

I've tried declaring all the variables originally I had it as

dim S,X,r,T,sigma,n As Double

Then i changed it to declaring them individually and then scrapped it because the variables were still empty. What you can see are the remaining ones I didn't delete due to my indecisiveness as to what to do next.

And you have said exactly my point. All the variables are empty. They are assigned to textbox values, but when values are entered into the textboxes the variables still remain empty.

What could I do to possibly solve this?