Class ModuleHeader
Reads what a VBA module's header says about the module itself.
public static class ModuleHeader
- Inheritance
-
ModuleHeader
- Inherited Members
Remarks
A class or designer module (a .cls, a UserForm) is exported with a VERSION
header line (VERSION 1.0 CLASS for a class, VERSION 5.00 for a designer) followed by
a BEGIN … END attribute block. A standard module has no such header and opens directly on
its Attribute VB_Name. The presence of the VERSION line is the signal, independent
of the file extension: RD-VBA determines a module's kind from its source, not from .cls vs
.bas.
A document module's export (a .doccls) carries no header: what makes a module one is the
project's word for it, which Of(DocClassType?, string?) reads before this.
Methods
IsClassModule(string?)
Whether source carries a module VERSION header: it is a class
or designer module. null when there is no source to inspect.
public static bool? IsClassModule(string? source)
Parameters
sourcestringThe raw module source, or
nullwhen it could not be read.
Returns
- bool?