Class VbaModule

VbaModule class

Represents a VBA module.

public class VbaModule : IVbaModule

Properties

NameDescription
Attributes { get; }
Name { get; }
SourceCode { get; }

Examples

Shows how to read modules of VBA project.

var project = new Project(DataDir + "VbaProject.mpp");

Console.WriteLine("Total Modules Count: " + project.VbaProject.Modules.Count);

foreach (var module in project.VbaProject.Modules)
{
    Console.WriteLine("Module Name: " + module.Name);
    Console.WriteLine("Source Code: " + module.SourceCode);
}

See Also