Subroutine can be thought of as small programs. Subroutine A is a name attributed to it, as much of a variable is. Unlike a variable, subroutine will not hold data. Instead has the code. When code in a subroutine is executed, the subroutine is said that “called”. ‘Call’ is used to call subroutines. Some subroutines are called when certain actions are performed.
Subroutines are used to eliminate redundancy. Consider the complex programs such as Point of Sale System, Inventory System and other system could be created using Visual Basic. These systems need a manageable and less code which might be easier to debug and decoding needs. If the subroutines are not used, all code will be repeated in each type of form in the system. Debugging such code is difficult to track. Through sub-routines, the code will be written once and can be called. In this case, the programmer can easily trace the errors and is ready for debugging and do everything the program easier and manageable.
