VBA & Macro Problems

How to Build and Install an Excel Automation Add-In with VB.NET UDFs

Khadija KhanKhadija Khan Nov 13, 2026 871 views

Question details

The user needs a repeatable method to build, install, and register an Excel Automation Add-In that exposes VB.NET user-defined functions.

How to Build and Install an Excel Automation Add-In with VB.NET UDFs
Product
Microsoft Excel Automation Add-In with VB.NET
Device & OS
Windows
Scenario
A developer or IT admin wants to deploy an Excel Automation Add-In with VB.NET UDFs so end users can install it consistently instead of manually registering components.
Observed behavior
Without an installer and repeatable deployment process, the add-in may not register correctly, and Excel may not expose or calculate the VB.NET user-defined functions.
Before you start

Before you begin, confirm that Visual Studio is installed with the .NET desktop development workload, Excel is available for testing, and you have administrator rights on the clean test computer so the installer can register the add-in.

Solution 1Recommended

Build and install the Excel Automation Add-In with a Visual Studio setup project

Use this method when you need a repeatable installer that registers the Automation Add-In and includes the VB.NET UDFs for Excel.

Visual Studio setup projects let you register .NET assemblies for COM interop and install them in the correct location. The referenced sample project provides a working template for the Automation Add-In and its VB.NET user-defined functions.

1
Open the sample project in Visual Studio

Download the referenced Automation Add-In sample from GitHub, open the .sln file in Visual Studio, and verify the project builds with the VB.NET UDF classes marked for COM registration.

2
Add or review the installer project

In Solution Explorer, right-click the solution and choose Add > New Project, then select Setup Project and add the primary output of the Automation Add-In project.

3
Set COM registration properties

In the setup project, select the add-in output, open the Properties window, and set Register to vsdrpCOM so the installer registers the VB.NET functions for Excel.

4
Build the installer

Choose Build > Build Solution to create the MSI package, then copy it to a clean test computer.

5
Test and verify in Excel

Install the MSI, open Excel, go to File > Options > Add-Ins, confirm the Automation Add-In is registered, and enter the sample UDF formula to verify it calculates correctly.

Build and install the Excel Automation Add-In with a Visual Studio setup project
Verification passed: If Excel shows the add-in and the sample formula returns the expected value, the deployment process is repeatable and the VB.NET UDFs are installed correctly.
Free Microsoft Office alternative

Use WPS Office as a Free Alternative for Spreadsheet VBA and Macro Workflows

For complex Excel Automation Add-In deployment, Microsoft Excel with Visual Studio is still required. For daily spreadsheet and VBA-compatible work, WPS Office is a free, lightweight Office suite with Excel format compatibility, a familiar ribbon interface, and easier migration for users who do not need COM add-in packaging.

Free and lightweight Office suite for Windows, Android, iOS, and web.Opens, edits, and saves Excel-format workbooks including .xlsx, .xlsm, and .xls.Works with VBA-enabled workbooks and macro tasks in WPS Spreadsheets on Windows.Familiar ribbon interface and Excel-compatible functions make migration easier.No Visual Studio installer or COM registration is needed for standard spreadsheet and macro workflows.
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Office support Excel Automation Add-Ins built with Visual Studio?

WPS Office does not register COM/VSTO automation add-ins the same way as Microsoft Excel. It can open Excel workbooks and work with VBA-enabled content, but for an Excel Automation Add-In built in Visual Studio, use Microsoft Excel.

Can I install a VB.NET Automation Add-In without Visual Studio?

You need a compiled DLL and a setup project or registration tool such as RegAsm. A Visual Studio setup project is the easiest repeatable method because it packages the add-in and registers it during installation.

How do I verify the add-in is registered?

In Excel, go to File > Options > Add-Ins, confirm the Automation Add-In appears, and then enter the sample UDF formula in a worksheet to check that it calculates correctly.

What should I do if the sample formula does not calculate after installation?

Rebuild the solution, check that COM registration is enabled in the setup project, confirm Excel is not in Safe Mode, and test the installer on a clean Windows computer.

Is VB.NET UDF deployment supported on Excel for macOS?

No, Excel Automation Add-Ins built with VB.NET require Windows. For cross-platform solutions, consider JavaScript-based Office Add-ins or a different add-in model.