O'Reilly logo

Special Edition Using Microsoft® Visual Basic® .NET by Jeff Spotts, Brian Siler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Sub Procedures

The key idea behind working with any type of procedure is to break down your program into a series of smaller tasks. Each of these tasks can then be encapsulated in a procedure, function, or possibly a class. (Classes are discussed in Chapter 9, “Creating Code Components.”) Programming in this manner presents several advantages:

  • You can test each task individually. The smaller amount of code in a procedure makes debugging easier and makes working on the same project with other developers easier.

  • You can eliminate redundant code by calling a procedure each time a task needs to be performed instead of repeating the program code.

  • You can create a library of procedures that can be used in more than one program, saving yourself ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required