VBA & Macro Problems

How to Create an Excel Data Entry Form with More Than 32 Fields in WPS Office

Camila MilosovichCamila Milosovich Nov 13, 2026 871 views

Question details

The user needs a spreadsheet data entry form that supports 40 fields. Excel's built-in Data Form is limited to 32 fields, so a custom VBA UserForm is required.

How to Create an Excel Data Entry Form with More Than 32 Fields in WPS Office
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A data-entry worksheet has 40 columns/fields, and the user wants a controlled form to add records without editing the worksheet directly.
Observed behavior
The built-in Data Form cannot display or process more than 32 fields, so a custom UserForm is needed for 40 fields.
Before you start

Before you start, enable the Developer tab in WPS Spreadsheets and save the workbook as a macro-enabled file (.xlsm). If you plan to use a MultiPage control, open the Toolbox and make sure the additional Microsoft Forms controls are available.

Solution 1Recommended

Create a VBA UserForm for 40 Fields and Write a Submit Procedure

Use this solution when you need more than 32 fields or want a controlled data-entry interface with buttons, validation, and a structured worksheet table.

WPS Spreadsheets supports VBA UserForms, so you can build an Excel-compatible custom form instead of relying on the built-in Data Form. A MultiPage control keeps a 40-field form usable by grouping related fields into tabs.

1
Open the Visual Basic editor and insert a UserForm

In WPS Spreadsheets, click Developer > Visual Basic or press Alt+F11. In the VBA editor, click Insert > UserForm. A blank form and Toolbox appear.

2
Add and name controls for all 40 fields

Drag Labels and TextBoxes from the Toolbox onto the UserForm for each field. Select each control, open the Properties window with F4, and set a meaningful Name such as txtFirstName or txtHireDate. For a 40-field layout, add a MultiPage control and create tabs such as "Personal", "Job", and "Payroll" so the fields stay organized.

3
Add a Submit button and open its code

Drag a CommandButton onto the form, set its Name to SubmitButton and Caption to "Submit Record". Double-click the button to open the code module for the click event.

4
Write the Submit procedure to append to a worksheet table

In the click event, use the worksheet ListObject to add a new row. For example: Dim ws As Worksheet, tbl As ListObject, newRow As ListRow; Set ws = ThisWorkbook.Worksheets("Data"); Set tbl = ws.ListObjects("Table1"); Set newRow = tbl.ListRows.Add; then assign each value such as newRow.Range(1, 1).Value = txtFirstName.Value and repeat for the remaining 39 controls.

5
Show the form from a worksheet button

Insert a shape or Button on the worksheet, right-click it and choose Assign Macro, then create or select a macro such as Sub ShowForm() UserForm1.Show End Sub. Save the workbook as .xlsm and click the button to open the form.

Create a VBA UserForm for 40 Fields and Write a Submit Procedure
Form ready for 40 fields: The custom UserForm can handle all 40 fields and write each submitted record to the next row of the worksheet table.
WPS Spreadsheets VBA solution

Build a 40-Field Data Entry Form in WPS Spreadsheets

WPS Spreadsheets can directly replace the limited built-in Data Form with a custom VBA UserForm. You can add all 40 fields, group them with a MultiPage control, and submit each record to an Excel-compatible worksheet table.

  1. 1. Enable the Developer tab: Open WPS Spreadsheets, click File > Options > Customize Ribbon, and enable Developer.
  2. 2. Insert a UserForm: Click Developer > Visual Basic, then Insert > UserForm.
  3. 3. Design the 40-field form: Add TextBoxes, Labels, a MultiPage control, and a Submit CommandButton using the Toolbox and Properties window.
  4. 4. Add submit code: Use ListObjects("Table1").ListRows.Add and write each control value to the new table row.
  5. 5. Run and save: Run the form from a worksheet button and save the workbook as a macro-enabled .xlsm file.
Handles more than 32 fields with a custom VBA UserFormSaves as .xlsm and remains compatible with Microsoft Excel workbooksUses the familiar Developer and Visual Basic workflowFree, lightweight, and easy to deploy on WindowsKeeps data entry organized with MultiPage tabs and submit buttons
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Spreadsheets have the same 32-field Data Form limit as Excel?

The built-in Data Form behavior is similar, so a data entry form with 40 fields is normally created as a VBA UserForm. A custom UserForm is not limited to 32 fields.

How do I open the VBA editor in WPS Spreadsheets?

Enable the Developer tab if needed, then click Developer > Visual Basic or press Alt+F11. In the editor, choose Insert > UserForm to start the custom form.

Can I organize 40 fields so the form is not too long?

Yes. Add a MultiPage control to the UserForm and group related fields into tabs such as Personal, Job, and Payroll. You can also set TabIndex order for smooth keyboard entry.

How do I save a workbook that contains the UserForm and VBA code?

Save the workbook as an Excel Macro-Enabled Workbook (.xlsm). This preserves the VBA project and lets the Submit button keep working when the file is reopened.