- 1). Open your developer environment, and open the project on which you are currently working. Click on your "Form1.vb" tab in the work area. If it is not visible, click on the "Solutions Explorer" tab on the right side of the screen. Navigate to the "Form1.vb" option, and click on it to display it in the work area.
- 2). Click on the green arrow pointing to the right along the top icon choices to debug your application. You should get an error message with a pop-up window asking if you want to run the application anyway. Click "No." Scroll through the coding page to find the first function that has blue, red or green squiggly underlines.
- 3). Click on "View" along the top menu choices and choose "Error List." A windowpane will open along the bottom of your work screen and display a list of errors that the developer environment found with your Visual Basic functions. The number to the left indicates the line of code where the error is.
- 4). Examine the line of code first for misspellings of the function. You will get an error if the word you typed does not match the exact spelling of the Visual Basic keyword function, including upper or lower case letters. Double check that all of your variables you assign to the function are declared at the top of your coding screen. If the variable is declared, make sure that type of variable in your Visual Basic function matches the type you assigned the same variable at the top. Make sure all your punctuation is correct. If you have a function that has a parentheses bracket at one end, make sure it has a matching one enclosing it at the other end, such as "("This is fun.")" and not "(This is fun."
- 5). Press the green arrow pointing to the right again. If your application runs, your Visual Basic functions do not have any more syntax errors. Test your applications by clicking on its buttons and having it manipulate data as applicable to your situation. If the application does not display or calculate properly, close the running application and return to the coding screen of your project. This indicates that you must debug for logic errors.
- 6). Click on "Debug" at the top of the screen. Choose "Step into" from the menu choices. This will let you run your application line by line to see at exactly what point your function produces an error. Correct errors like mathematical equations and Visual Basic commands within the function itself.
- 7). Save your work and rerun your application. Repeat the steps as necessary until your Visual Basic functions perform properly.
SHARE