Search notes:

VBA: Module, function and variable attributes

Module attributes

Module attributes are declared in the header of a module.
The following attributes are available
VB_Createable defines, together with VB_Exposed a class's accessibility and instancing.
VB_Exposed defines, together with VB_Createable a class's accessibility and instancing.
VB_GlobalNameSpace If set to true, the class is associated with a default instance variable with no publicly expressible name. Compare with VB_PredeclaredId. The class can be accessed using the classes default instance members.
VB_Name This attribute is used for both, class modules and ordinary modules: it names the module when it is imported.
VB_PredeclaredId If set to true, the class is associated with a default instance variable whose name is equal to that of the class. Compare with VB_GlobalNameSpace
The default values for these attributes is false.

Function, Sub and/or Method attributes

VB_VarDescription allows to add a description to a subs and functions.
VB_UserMemId specifies the DISPID for the method. If the value is 0, it specifies an object's default member function.
VB_MemberFlags
VB_ProcData.vb_invoke_func Allows to associate a VBA function with a keyboard shortcut.

Variable attributes

Then, there seems also to be the variable attribute VB_VarDescription

Identifying classes

In order to be able to identify class modules when they're imported, the file's first line must(?) read
VERSION 1.0 CLASS
This line probably doesn't count as an attribute, though.

Index