How to Show an Excel Combo Box Selection in a UserForm Text Box
Question details
The user needs to resize an ActiveX combo box in an Excel UserForm and automatically display the selected drop-down value inside a text box.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Designing a UserForm with ActiveX controls where dynamic data from a combo box must populate a text box for further processing.
- Observed behavior
- ActiveX combo boxes can be difficult to resize directly on the sheet, and require VBA change event code to successfully pass their selected value to another control.
Ensure that the Developer tab is enabled in your Excel ribbon and that your workbook is saved as a Macro-Enabled Workbook (.xlsm) to allow VBA code execution.
Resize the Combo Box and Link it to a Text Box via VBA
Use Design Mode and the Properties window to properly adjust the dimensions of your ActiveX combo box, then use a VBA Change event to link its value to the text box.
ActiveX controls behave differently than standard form controls. They must be modified while in Design Mode to access their backend properties like Width and Height.
To pass data between UserForm elements interactively, you need to use VBA event triggers. The Change event ensures that the moment a user selects a new item in the combo box, the text box updates instantly.
Navigate to the Developer tab on your Excel ribbon. Click on the 'Design Mode' button to activate it, which allows you to edit and interact with ActiveX controls.
Click on your combo box to select it. Still on the Developer tab, click 'Properties'. In the Properties window that appears, locate the 'Width' and 'Height' fields and increase their numerical values to resize the combo box as needed.
Double-click the combo box to open the Visual Basic for Applications (VBA) editor. This will automatically generate a 'Change' event subroutine. Inside this subroutine, type the code: TextBox1.Text = ComboBox1.Value (ensure the control names match your actual UserForm names).
Close the VBA editor, exit Design Mode by clicking its button again, and interact with your combo box. Selecting an item should now instantly display that value in the linked text box.

Manage Macros and UserForms Efficiently with WPS Office
WPS Office provides robust and intuitive support for VBA and macros. You can easily insert ActiveX controls, design interactive UserForms, and automate your workflow with a familiar, streamlined interface.
- 1. Open your workbook: Launch WPS Spreadsheets and open your macro-enabled workbook.
- 2. Access the Developer Tab: Navigate to the Developer tab on the top ribbon to view all macro and control tools.
- 3. Use the Visual Basic Editor: Click 'Visual Basic' or 'Design Mode' to start modifying your combo boxes and writing event handlers seamlessly.

Frequently Asked Questions
Why is my ActiveX combo box not resizing when I drag the corners?
ActiveX controls often restrict drag-to-resize behavior depending on the worksheet setup. To ensure precise resizing, you must enable Design Mode from the Developer tab, open the Properties window, and manually adjust the 'Width' and 'Height' property values.
How do I populate the drop-down list of the combo box?
While in Design Mode, click the combo box and open the Properties window. Find the 'ListFillRange' property and type the reference to the cell range containing your list items (for example, Sheet1!A1:A10).
Can I link the combo box selection directly to a spreadsheet cell instead of a text box?
Yes. In the Properties window of the combo box, look for the 'LinkedCell' property. Type the cell address (e.g., B1) here, and the combo box selection will automatically output to that cell without needing any VBA code.
How do I show the Developer tab if it is missing from my ribbon?
Go to File > Options > Customize Ribbon. In the right-hand column under Main Tabs, check the box next to 'Developer', then click OK to display it.




