Class VbaModuleAttribute

VbaModuleAttribute class

The attribute of the VbaModule object

public sealed class VbaModuleAttribute : IEquatable<VbaModuleAttribute>

Properties

NameDescription
Key { get; }Gets key of VBA module attribute.
Value { get; }Gets value of VBA module attribute.

Methods

NameDescription
override Equals(object)Returns a value indicating whether this instance is equal to the specified VbaModuleAttribute object.
Equals(VbaModuleAttribute)Returns a value indicating whether this instance is equal to the specified VbaModuleAttribute object.
override GetHashCode()Returns a hash code value for this VbaModuleAttribute.

Examples

Shows how to work with VBA module attributes.

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

foreach (var module in project.VbaProject.Modules)
{
    Console.WriteLine("Attributes Count: " + module.Attributes.Count);
    foreach (var attribute in module.Attributes)
    {
        Console.WriteLine("  VB Name: " + attribute.Key);
        Console.WriteLine("  Module: " + attribute.Value);
    }
}

See Also