How to Edit Programs in Visual Basic

Once a computer program is installed and used, it sometimes requires updating due to output errors or changes in user requirements. An application program developed using the Visual Basic language can be edited by the programmer at any time.

Things You'll Need

  • Computer
  • Visual Basic 6 software
Show More

Instructions

    • 1

      Create a backup copy of the program before changing anything. If you need to revert to the old design and code, you will have the files available.

    • 2

      Locate the folder where the VB program and all its files are found. Click the Project file with the .vbp extension to open the entire project.

    • 3

      Select the Form you want to edit. You can edit a VB program in both the graphical interface or the source code. A Visual Basic project is made up of several "Forms" and "Modules" which the programmer works on. In the "Project Explorer" window, click the "Form" name to load.

    • 4

      Add, remove or change control(s) on the form and set their properties. Use the "Toolbox" window on the left to drag and drop controls into the form. Set their properties by choosing the appropriate settings from the "Properties" window on the right. If there is no change in the form design, click the "View Code" button on the "Project Explorer" window to go directly to the source code.

    • 5

      Edit the source code in the appropriate event, procedure, or function. For example, if the surcharge rate used to calculate overdue billing changes, then edit the formula that calculates the amount by changing the old rate to the current one.

    • 6

      Click the "Save" button on the menu bar or press "Ctrl" + "S" on the keyboard to save the changes you made.

    • 7

      Click the "Run" button on the menu bar to run the program. Check if the changes you made to the design or code are working. If syntax or logic errors occur, then recheck the code and correct them. Run the program again until the "Form" is executing properly.

    • 8

      Edit other "Forms" contained within the program, if any. Repeat steps 3-7 to work on it.

    • 9

      Compile the program when you are done editing. Make an executable file by clicking "File>Make [Project Name.exe].

    • 10

      Copy the executable file and overwrite the old program installation.

Tips & Warnings

  • Use "Ctrl" + "F" to search for specific keywords within the source code. This is helpful when the program has thousands of lines of code.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured