Interface IVbaModule

IVbaModule interface

Represents a module with VBA code.

public interface IVbaModule

Properties

NameDescription
Attributes { get; }Gets a collection of VbaModuleAttributeCollection
Name { get; }Gets a name of the VBA module
SourceCode { get; }Gets a source Code of the VBA module

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