lunaclover
Programmer
- Jun 22, 2005
- 54
Hi - I'm back! How is everybody?
I'm trying to build nomenclature out and have a subroutine for each section of the build number. One for 'a', one for 'b', one for 'c' and then pass them all into a final build subroutine called BuildNumber, where txtBuildNumber.text = a+b+c+d+e+f+g+h
I'm just doing this to avoid putting a million things after the Handles statement, like I would have to do if I just put it all in one subprocedure. Each selection a user makes in run-time will change sections of the build number in the text box at the bottom of the screen, as they change their selections.
So what am I doing wrong? Here is one example of a section of the build number, followed by the buildnumber procedure itself.
I tried passing but since only one variable is being passed from each thing, it gets mad that the number of parameters one is passing and the number of parameters the BuildNumber is catching don't match. What is another solution to this? I am trying to keep it neat and clean instead of cramming it all into one subprocedure that Handles 8 million checkboxes, radiobuttons and comboboxes. Is there a way for each subprocedure to pass one variable and then the BuildNumber catch all of them and put them together like I want?
Thanks advance for your help!
Luna
I'm trying to build nomenclature out and have a subroutine for each section of the build number. One for 'a', one for 'b', one for 'c' and then pass them all into a final build subroutine called BuildNumber, where txtBuildNumber.text = a+b+c+d+e+f+g+h
I'm just doing this to avoid putting a million things after the Handles statement, like I would have to do if I just put it all in one subprocedure. Each selection a user makes in run-time will change sections of the build number in the text box at the bottom of the screen, as they change their selections.
So what am I doing wrong? Here is one example of a section of the build number, followed by the buildnumber procedure itself.
Code:
Private Sub NomenclatureA(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbox1.CheckedChanged, chkbox2.CheckedChanged, chkbox3.CheckedChanged...
Dim a As String
If chkbox1.Checked AndAlso chkbox2.Checked Then
a = "T"
ElseIf chkbox1.Checked AndAlso chkbox3.Checked Then
a = "M"
.
.
.
call BuildNumber()
end sub
Private Sub BuildNumber()
Dim a, b, c, d, e, f, g, h As String
txtBuildNumber.Text = a+ b+ c+ d+ e+ f+ g+ h
End sub
I tried passing but since only one variable is being passed from each thing, it gets mad that the number of parameters one is passing and the number of parameters the BuildNumber is catching don't match. What is another solution to this? I am trying to keep it neat and clean instead of cramming it all into one subprocedure that Handles 8 million checkboxes, radiobuttons and comboboxes. Is there a way for each subprocedure to pass one variable and then the BuildNumber catch all of them and put them together like I want?
Thanks advance for your help!
Luna