Name
Sub Statement
Syntax
[ClassBehavior] [AccessModifier] Subname[(arglist)] [statements] [Exit Sub] [statements] End Sub
-
ClassBehavior(optional; Keyword) One of the keywords shown in the following table:
|
Keyword |
Description |
|---|---|
|
|
Indicates that more than one declaration of this subroutine exists (with different argument signatures). |
|
|
For derived classes, indicates that the subroutine overrides the subroutine by the same name (and argument signature) in the base class. |
|
|
Indicates that the subroutine can be overridden in a derived class. |
|
|
Indicates that the subroutine cannot be overridden in a derived class. |
|
|
Indicates that the subroutine must be overridden in a derived class. |
|
|
In a derived class definition, indicates that calls to derived class members that are made through a base class ignore the shadowed implementation. |
|
|
Callable without creating an object of the class. It is, in this strange sense, shared by all objects of the class. These are also called static subroutines. |
-
AccessModifier(optional) The possible values of
AccessModifierarePublic,Private,Friend,Protected, orProtectedFriend. The following table describes the effects of the various access modifiers. Note that “direct access” refers to accessing the member without any qualification, as in:classvariable = 100
and “class/object access” refers to accessing the member through qualification, either with the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access