Office Settings & Configuration

Create a Custom User Form in Excel for the Web with Office Add-ins

Nimra MalikNimra Malik Nov 18, 2026 868 views

Question details

The user wants a custom form in Excel for the web that displays a worksheet record with more than 20 columns.

Create a Custom User Form in Excel for the Web with Office Add-ins
Product
Microsoft Excel for the web
Device & OS
not provided
Scenario
A user selects a worksheet cell or row and wants to view its record in a custom interface.
Observed behavior
The desired interface should read the selected record and display its fields in a task pane or dialog; desktop VBA UserForms do not run in Excel for the web.
Before you start

Identify the worksheet, header row, and columns that make up each record. Check that your organization allows Office Add-ins and that the Excel APIs you need are supported in your target environment.

Solution 1Recommended

Build an Office Add-in with a Custom Task Pane

Use a web-based Office Add-in to display the selected worksheet record in Excel for the web.

An Office Add-in uses HTML, CSS, JavaScript, and the Office JavaScript API. It is a separate web interface, not a conversion of a VBA UserForm.

Selection-change events can update the form as the user selects another cell, where the required Excel API is supported.

1
Create the add-in project

Follow Microsoft's Office Add-ins documentation to create an Excel task pane add-in with a manifest and a web page containing your HTML, CSS, and JavaScript.

2
Design the record form

Add labeled fields to the task pane page for the worksheet's record columns. Use a scrollable layout or sections if more than 20 fields need to be displayed.

3
Read the selected record

In the add-in's JavaScript, use Office.onReady and Excel.run, then call getSelectedRange to identify the selected row. Read the corresponding worksheet range across the record columns and load its values into the form.

4
Refresh the form on selection

Register a worksheet onSelectionChanged handler, where supported, to read the newly selected row and update the task pane fields. Re-register the handler when the add-in starts.

5
Load and test the add-in

Deploy or sideload the manifest using the method available to your organization, open the add-in in Excel for the web, and select different data rows to verify that the correct fields appear.

Build an Office Add-in with a Custom Task Pane
VBA UserForms are not supported on the web: Rebuild the interface and any required logic in the add-in. Displaying values does not automatically save edits back to the worksheet; add write-back logic if editing is required.
Free Microsoft Office alternative

Work with Excel Records in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Excel format compatibility, making it easier to move existing workbooks between applications. It does not replace the Excel for the web Office Add-in described above.

View and organize worksheet records in WPS SpreadsheetsOpen and edit Microsoft Excel XLSX filesUse a familiar interface for a smoother move from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can I run an existing VBA UserForm in Excel for the web?

No. Excel for the web does not run desktop VBA UserForms. Rebuild the interface as an Office Add-in using web technologies and the Office JavaScript API.

How can the form show the row I selected?

Use Excel.run and getSelectedRange to identify the selection, then read the record's column range from that row. A worksheet onSelectionChanged handler can refresh the form when the selection changes, where supported.

Can an Office Add-in display more than 20 columns?

Yes. Read the relevant worksheet range and render its values as labeled fields in the task pane. A scrollable layout or grouped sections can make a long record easier to navigate.

Will changes in the form automatically update the worksheet?

No. Add JavaScript that writes edited field values to the appropriate worksheet range, and provide a button such as Save for the user to submit the changes.

What if I cannot load the add-in in Excel for the web?

Check the manifest and deployment instructions in Microsoft's Office Add-ins documentation. Also ask your administrator whether your organization permits sideloading or requires centralized deployment.