Class VbaProjectReference

Class VbaProjectReference

Namespace: Aspose.Cells.Vba
Assembly: Aspose.Cells.dll (25.2.0)

Represents the reference of VBA project.

public class VbaProjectReference

Inheritance

objectVbaProjectReference

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

//Instantiating a Workbook object
Workbook workbook = new Workbook();
 // Init VBA project.
VbaProject vbaProject = workbook.VbaProject;
// Add vba project reference
vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation");
//Saving the Excel file
workbook.Save("book1.xlsm");
'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook()
'Init VBA project.
Dim vbaProject as VbaProject  = workbook.VbaProject
'Add vba project reference
vbaProject.References.AddRegisteredReference("stdole", "*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation")
'Saving the Excel file
workbook.Save("book1.xlsm")

Properties

ExtendedLibid

Gets and sets the extended Libid of the reference.

public string ExtendedLibid { get; set; }

Property Value

string

Remarks

Only for control reference.

Libid

Gets and sets the Libid of the reference.

public string Libid { get; set; }

Property Value

string

Name

Gets and sets the name of the reference.

public string Name { get; set; }

Property Value

string

RelativeLibid

Gets and sets the referenced VBA project’s identifier with an relative path.

public string RelativeLibid { get; set; }

Property Value

string

Remarks

Only for project reference.

Twiddledlibid

Gets and sets the twiddled Libid of the reference.

public string Twiddledlibid { get; set; }

Property Value

string

Remarks

Only for control reference.

Type

Gets the type of this reference.

public VbaProjectReferenceType Type { get; }

Property Value

VbaProjectReferenceType

Methods

Copy(VbaProjectReference)

public void Copy(VbaProjectReference source)

Parameters

source VbaProjectReference