Class VbaReference

VbaReference class

Represents a reference of the VbaProject.

public sealed class VbaReference : IEquatable<VbaReference>

Constructors

NameDescription
VbaReference()The default constructor.

Properties

NameDescription
LibIdentifier { get; }Gets identifier of the library.
Name { get; set; }Gets or sets name of VBA reference.

Methods

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

Examples

Shows how to read VBA references.

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

Console.WriteLine("Reference count " + project.VbaProject.References.Count);

foreach (var reference in project.VbaProject.References)
{
    Console.WriteLine("Identifier: " + reference.LibIdentifier);
    Console.WriteLine("Name: " + reference.Name);
}

See Also