Parts of a Sub Routine

Parameters:
Optional. List of attributes that apply to this procedure. Multiple attributes are separated by commas.
Overloads
Optional. Indicates that this Sub procedure overloads one or more procedures defined with the same name in a base class. The argument list in this declaration must be different from the argument list of every overloaded procedure. The lists must differ in the number of arguments, their data types, or both. This allows the compiler to distinguish which version to use.

You do not have to use the Overloads keyword when you are defining multiple overloaded procedures in the same class. However, if you use Overloads in one of the declarations, you must use it in all of them.

You cannot specify both Overloads and Shadows in the same procedure declaration.

Overrides
Optional. Indicates that this Sub procedure overrides an identically named procedure in a base class. The number and data types of the arguments must exactly match those of the base class procedure.
Overridable
Optional. Indicates that this Sub procedure can be overridden by an identically named procedure in a derived class. Overridable is the default setting for a procedure that itself overrides a base class procedure.
NotOverridable
Optional. Indicates that this Sub procedure cannot be overridden in a derived class. NotOverridable is the default setting for a procedure that does not itself override a base class procedure.
MustOverride
Optional. Indicates that this Sub procedure is not implemented in this class and must be implemented in a derived class for that class to be creatable.
Shadows
Optional. Indicates that this Sub procedure shadows an identically named programming element, or set of overloaded elements, in a base class. You can shadow any kind of declared element with any other kind. If you shadow a procedure with another procedure, the arguments and the return type do not have to match those in the base class procedure. A shadowed element is unavailable from within the derived class that shadows it, unless the shadowing element is inaccessible, for example if it is Private.

You cannot specify both Overloads and Shadows in the same procedure declaration.

Shared
Optional. Indicates that this Sub procedure is a shared procedure. This means it is not associated with a specific instance of a class or structure. You can call a shared procedure by qualifying it either with the class or structure name, or with the variable name of a specific instance of the class or structure.
Public
Optional. Procedures declared with the Public keyword have public access. There are no restrictions on the accessibility of public procedures.
Protected
Optional. Procedures declared with the Protected keyword have protected access. They are accessible only from within their own class or from a derived class. Protected access can be specified only on members of classes. It is not a superset of friend access.
Friend
Optional. Procedures declared with the Friend keyword have friend access. They are accessible from within their declaration context and from anywhere else in the same program.
Protected Friend
Optional. Procedures declared with the Protected Friend keywords have the union of protected and friend access. They can be used by code in the same program, as well as by code in derived classes. Protected friend access can be specified only on members of classes.
Private
Optional. Procedures declared with the Private keyword have private access. They are accessible only from within their declaration context, including from members of any nested types such as procedures.
name
Required. Name of the Sub procedure. Must be a valid Visual Basic identifier.
arglist
Optional. List of variables or expressions representing arguments that are passed to the Sub procedure when it is called. Multiple arguments are separated by commas. If you supply an argument list, you must enclose it in parentheses.
Implements
Optional. Indicates that this Sub procedure implements a Sub procedure defined by an interface.
interface
Required if Implements is supplied. The interface implemented by the class or structure containing this Sub procedure. The class or structure must specify interface in an Implements statement immediately following the Class or Structure statement.
definedname
Required if Implements is supplied. The name by which the Sub procedure is defined in interface. The name of this Sub procedure (in name) does not have to be the same as definedname.
statements
Optional. A block of statements to be executed within the Sub procedure.
End Sub
Terminates the definition of this Sub procedure.