define sub in vba
User-Defined VBA Function & Sub Procedures. In Excel Visual Basic, a set of commands to perform a specific task is placed into a procedure, which can be a Function procedure or a Sub procedure (also known as functions and subroutines).