Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In Microsoft Excel, you can add a library reference to the VBA project by clicking Tools > References…. It will open the following dialog box, which helps you select from existing references or browse for your library.

But sometimes you need to add or register a library reference to the VBA project through code. You can do it using Aspose.Cells VbaProject.getReferences().addRegisteredReference() method.
The following sample code adds or registers two library references to the VBA project of the workbook using the VbaProject.getReferences().addRegisteredReference() method.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.