Class Module (Access VBA)

A Module object refers to a standard module or a class module.

The classes Form and Report. give access to class Module

Methods

AddFromFile - The AddFromFile method adds the contents of a text file to a Module object. The Module object may represent a standard module or a class module.

AddFromString - The AddFromString method adds a string to a Module object. The Module object may represent a standard module or a class module.

CreateEventProc - The CreateEventProc method creates an event procedure in a class module.

DeleteLines - The DeleteLines method deletes lines from a standard module or a class module.

Find - Finds specified text in a standard module or class module.

InsertLines - The InsertLines method inserts a line or group of lines of code in a standard module or a class module.

InsertText - The InsertText method inserts a specified string of text into a standard module or a class module.

ReplaceLine - The ReplaceLine method replaces a specified line in a standard module or a class module.

Properties

Name (Default member) - You can use the Name property to specify or determine the string expression that identifies the name of an object.

CountOfDeclarationLines the CountOfDeclarationLines property returns a Long value indicating the number of lines of code in the Declarations section in a standard module or class module.

CountOfLines the CountOfLines property returns a Long value indicating the number of lines of code in a standard module or class module.

Lines the Lines property returns a string containing the contents of a specified line or lines in a standard module or a class module.

ProcBodyLine the ProcBodyLine property returns the number of the line at which the body of a specified procedure begins in a standard module or a class module.

ProcCountLines the ProcCountLines property returns the number of lines in a specified procedure in a standard module or a class module.

ProcOfLine the ProcOfLine property returns the name of the procedure that contains a specified line in a standard module or a class module.

ProcStartLine the ProcStartLine property returns a value identifying the line at which a specified procedure begins in a standard module or a class module.

Type indicates whether a module is a standard module or a class module.