An old thread, but I wanted to fill in on it anyway...
The attributes you see (and the BEGIN/END) are part of the VB language, but not exposed directly in VBA. As Sue says, they're visible when you export a module, and they DO take effect based on their respective settings when imported to a project. It is someone common (among Access developers, at least) to export a module so that these attributes can be modified, and import the module back into the project again.
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
End
So far as I'm aware, this is part of every class module and will always look the same.
VB_Name = "ThisOutlookSession"
The name of the module as it loads when imported (filename is irrelevant)
VB_GlobalNameSpace = False
This one I'm unfamiliar with...
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
These three deal with how the class is seen from outside the project - whether it can be used external, whether it can be created externally, etc. Specific details escape me, having no reference in front of me on them at the moment, though. (go to UtterAccess.com and search in the Wiki there for an article called Singleton, which gives one such example).
Public WithEvents colExplorers As Outlook.Explorers
Attribute colExplorers.VB_VarHelpID = -1
Public WithEvents objExplorer As Outlook.Explorer
Attribute objExplorer.VB_VarHelpID = -1
The VarHelpID is an internal note for linking the line with a help context in the object browser. Apparently, there's even ways to pull up custom help files for custom objects in the Object Browser using similar syntaxes, though I have no personal experience with this.
There's a handful more that aren't shown here - for example, we can write a custom collection object, export it, set the default item and enumerable, then re-import, thus allowing us to use a custom collection class in a for each ... next loop.
Anyway, just figured I'd clear some of that up in case others come across this. They're there for a reason and they have an effect on how the code works, thus I'd advise tweaking them unless you know what they're doing and what you intend to do.
Jack D. Leach
Microsoft Access MVP
dymeng.com