9.0

94
Code Module
Group
Declaration
Description
A Code module implements a code library.
Has a set of Public procedures accessible from other macros and modules.
The public symbols are accessed directly.
Can optionally contain Attributes
See Also: Attribute Definition/Statement, Class Module, Object Module, Uses.
Example
'MyCommands macro
'#Uses "Module1.BAS"
Sub
Main
Debug
.Print Value '"Hello"
End
Sub
'Module1.BAS code file
Attribute VB_Name
= "Module1"
Option
Explicit
Private
mValue As String
Property
Get Value() As String
Value = mValue
End Property
'this sub is called when the module is first loaded
Private
Sub Main
mValue = "Hello"
End
Sub
Object Module
Group
Declaration
Description
An object module implements an ActiveX Automation object.
It has a set of Public
procedures accessible from other macros and modules.
These public symbols are accessed via the name of the object module or an object variable.