C
ChrisB4024
Guest
Hello:
I last programmed in VB6 before 2005, so I'm trying to get back into it using VB.NET 2017. Hopefully this is a simple problem someone can easily guide me through.
I have one form (frmMain) that has (so far) two Group Boxes on it, each with some text boxes that only allow numbers as input. I want to assign the number the user inputs in the text box to a variable.
Basic Idea: txtD is the text box; I want this number to be assigned to the variable sngD after the rest of the text boxes have data entered (txtE assigned to sngE, etc.) and the user clicks the "Continue -->" button (btnContinueToDialNums). After clicking that button, the focus goes to the next set of text boxes for input, each of those numbers being assigned a variable after clicking the "Calculate" button.
I used "Dim sngD As Single = Convert.ToInt32(txtD.Text)" to start, but I don't have access to the variable sngD in other parts of the program. Do I need to globally declare sngD? If so, where at so I have access to it anywhere within the form? I'm probably wording this wrong, so please correct me if needed.
Thanks for any guidance,
-- ChrisB4024
Continue reading...
I last programmed in VB6 before 2005, so I'm trying to get back into it using VB.NET 2017. Hopefully this is a simple problem someone can easily guide me through.
I have one form (frmMain) that has (so far) two Group Boxes on it, each with some text boxes that only allow numbers as input. I want to assign the number the user inputs in the text box to a variable.
Basic Idea: txtD is the text box; I want this number to be assigned to the variable sngD after the rest of the text boxes have data entered (txtE assigned to sngE, etc.) and the user clicks the "Continue -->" button (btnContinueToDialNums). After clicking that button, the focus goes to the next set of text boxes for input, each of those numbers being assigned a variable after clicking the "Calculate" button.
I used "Dim sngD As Single = Convert.ToInt32(txtD.Text)" to start, but I don't have access to the variable sngD in other parts of the program. Do I need to globally declare sngD? If so, where at so I have access to it anywhere within the form? I'm probably wording this wrong, so please correct me if needed.
Thanks for any guidance,
-- ChrisB4024
Continue reading...