Slim down this part of my code?
You helped me learn about parsing input to make sure it was in the right format when entered. But now I have these lines all over my script page, which is about 650 lines long now. Is the following possible, I am sure it is.
Thanks for all of your help.
I have several subs in my program, have tried to make a function to do the following, but couldn't get it to work. I tried the .parse extension and the .tryparse extension, neither one worked. I'm sure it is just something I don't understand yet about the code.
If Not Double.TryParse(tbOpeningWidth.Text, OpenWidth) Then
Return
End If
DoorWidth = (OpenWidth + 2) / 3
If Not Double.TryParse(tbOpeningHeight.Text, OpenHeight) Then
Return
End If
DoorHeight = OpenHeight + 1
I have this in appx. four subroutines, common sense tells me there has to be a way to send the values to a single function, parse them there,
and either:
1) send them to their destination on the Form directly from the Function or,
2) send them back to the subroutine they originated from for further manipulation.
I have another question about data entry and functions that none of my books seem to have an answer to. I have looked on the internet as well. It concerns resetting radiobuttons after doing a calculation when hitting the clear fields button to enter new figures.??????
Thx in advance.
