This documentation is archived and is not being maintained.


The Shared keyword indicates that one or more declared programming elements are shared. Shared elements are not associated with a specific instance of a class or structure. You can access them by qualifying them either with the class or structure name, or with the variable name of a specific instance of the class or structure.

The Shared keyword is used in these contexts:

Dim Statement

Event Statement

Function Statement

Property Statement

Sub Statement

See Also

Lifetime | Procedures | Structures: Your Own Data Types | Understanding Classes