Code Module

Group: Declaration

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.

See Also: Class Module, Object Module, Uses.



'#Uses "Module1.BAS"

Sub Main

Debug.Print Value '"Hello"

End Sub



'File|New Module|Code Module


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