VBA & Macro Problems

Fix Excel ActiveX Combo Box Event Code That Is Not Working

Muhammad TalhaMuhammad Talha Nov 12, 2026 870 views

Question details

The user needs to make VBA event procedures run for an ActiveX Combo Box in an Excel worksheet.

Fix Excel ActiveX Combo Box Event Code That Is Not Working
Product
Microsoft Excel VBA ActiveX Combo Box
Device & OS
not provided
Scenario
The user has added an ActiveX Combo Box and wants its Change, GotFocus, or LostFocus event procedure to respond when the control is used.
Observed behavior
The ActiveX Combo Box event code does not run as expected.
Before you start

Make sure the workbook is saved as a macro-enabled Excel file (.xlsm) and that macros are enabled when opening it. Identify the exact Name value of the ActiveX Combo Box in the Properties window before checking the VBA procedure.

Solution 1Recommended

Place the ActiveX Combo Box event procedure in the correct worksheet module

Use this solution when the control is on a worksheet and its event code does not run at all.

ActiveX control events on a worksheet must be stored in that worksheet's code module, not in a standard module such as Module1 and not in the ThisWorkbook module. The procedure name must also use the control's exact Name property.

1
Open the Visual Basic Editor

In Excel, press Alt+F11 to open the Visual Basic Editor.

2
Open the matching worksheet module

In Project Explorer, expand VBAProject, expand Microsoft Excel Objects, and double-click the worksheet that contains the ActiveX Combo Box, such as Sheet1.

3
Confirm the control name

Return to the worksheet, select Developer > Design Mode, click the Combo Box, and select Developer > Properties. Check the value beside (Name), such as ComboBox1.

4
Use an exact event procedure name

In the worksheet code window, add or correct a procedure such as Private Sub ComboBox1_Change(). Replace ComboBox1 with the exact (Name) value shown in the Properties window.

5
Test whether the event fires

Add MsgBox "Change event fired" inside the ComboBox1_Change procedure, turn off Developer > Design Mode, and change the selected item in the Combo Box.

Place the ActiveX Combo Box event procedure in the correct worksheet module
Correct event location: If the message appears after you change the selection, Excel is recognizing the ActiveX control event and you can replace the test message with your intended VBA code.
Free Microsoft Office alternative

Use WPS Office for Everyday Excel-Compatible Spreadsheet Work

If an Excel ActiveX control or VBA environment continues to cause workbook-specific issues, WPS Office is a free, lightweight Office alternative for creating, editing, and sharing spreadsheets. Its familiar spreadsheet interface and strong workbook format compatibility make it easy to move routine spreadsheet work from Microsoft Office with minimal adjustment.

Free and lightweight spreadsheet software for everyday workbook editingOpens and saves Microsoft Excel .xlsx and .xls workbook formatsFamiliar ribbon-style interface supports a smooth transition from ExcelProvides practical tools for formulas, charts, tables, and data organization
microsoft office alternative - wps office

Frequently Asked Questions

Where should ActiveX Combo Box Change event code be placed in Excel?

Place the code in the code module for the worksheet that contains the Combo Box. In the Visual Basic Editor, expand Microsoft Excel Objects and double-click that specific sheet, then use a procedure such as Private Sub ComboBox1_Change().

Why does my Combo Box event procedure not run even though the code has no errors?

The procedure may use a name that does not match the control's (Name) property, be located in a standard module, or belong to a Form Control rather than an ActiveX control. Check the Name in Developer > Design Mode > Properties.

How can I tell whether my Excel Combo Box is an ActiveX control?

Turn on Developer > Design Mode and select the control. If Developer > Properties opens a property list with values such as (Name), Enabled, and LinkedCell, it is an ActiveX control. Form Controls use Assign Macro instead.

Does Design Mode need to be turned off for an ActiveX Combo Box to work?

Yes. Developer > Design Mode must be turned off before you can interact with the control normally and test its Change, GotFocus, or LostFocus event procedures.

How do I test whether an ActiveX Combo Box Change event is firing?

Add a temporary line such as MsgBox "Change event fired" inside the ComboBox_Change procedure, or click in the procedure margin in the Visual Basic Editor to set a breakpoint. Then exit Design Mode and change the Combo Box selection.