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.
RD-VBA .doccls files are the VBIDE rendering of a document module rather than an importable
export, so they carry no header and are out of scope here.
Methods
IsClassModule(string?)
Whether source carries a module VERSION header — i.e. 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?