Clear Excel ActiveX Combo Boxes When a Workbook Opens
Question details
The user wants to clear multiple ActiveX combo boxes each time an Excel workbook opens, without deleting their list values.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A workbook contains ActiveX combo boxes and needs to open with all combo boxes blank while preserving their drop-down list items.
- Observed behavior
- Combo boxes retain previous values when the workbook opens; the user wants a Workbook_Open event to reset them automatically.
Open the workbook in Excel and press Alt+F11 to open the VBA editor. Make sure the workbook is not protected and that the VBA project is accessible before adding the Workbook_Open code.
Use Workbook_Open Event to Clear ActiveX Combo Boxes
Use this solution when you want all ActiveX combo boxes on a worksheet to reset to blank each time the workbook opens, without removing their drop-down list values.
This code loops through every OLEObject on the active sheet and clears only objects whose type is ComboBox. It does not remove the combo box list items, so the drop-down values remain available after the fields are cleared.
In Excel, press Alt+F11 to open the Visual Basic for Applications editor.
In the Project Explorer pane, find your workbook, expand Microsoft Excel Objects, and double-click ThisWorkbook.
Copy the following code into the ThisWorkbook module: Private Sub Workbook_Open() Dim cb As OLEObject For Each cb In ActiveSheet.OLEObjects If TypeName(cb.Object) = "ComboBox" Then cb.Object.Value = "" End If Next cb End Sub
Go to File > Save As, choose Excel Macro-Enabled Workbook (*.xlsm), and save the file.
Close the workbook and reopen it. If prompted, click Enable Content or Enable Macros so the Workbook_Open event can run.

Use WPS Office as a Free, Lightweight Spreadsheet Alternative
This ActiveX VBA workflow belongs to Microsoft Excel and may not behave the same in WPS Office. If you are looking for a free, lightweight Office suite for everyday spreadsheet work, WPS Office opens Excel workbooks with a familiar ribbon, strong Microsoft Office format compatibility, and a simple migration path.
- 1. Download WPS Office: Go to the official WPS Office website and download the free Windows or Mac version.
- 2. Open your Excel workbook: Launch WPS Spreadsheets and open the existing .xlsx or .xlsm workbook.
- 3. Review the workbook: Check formulas, formatting, and data in the familiar ribbon interface, and save the file in a WPS-compatible Excel format.

Frequently Asked Questions
Where should I put the code to clear ActiveX combo boxes when the workbook opens?
Open the VBA editor with Alt+F11, double-click ThisWorkbook under Microsoft Excel Objects, and paste the Workbook_Open event there. Code placed in a standard module will not run automatically on open unless it is called.
Will this VBA code delete the combo box list items?
No. It sets cb.Object.Value to an empty string, which clears the selected value but leaves the ListFillRange or list values intact.
How do I clear combo boxes only on a specific worksheet?
Replace ActiveSheet with Worksheets("Sheet1") in the code, changing Sheet1 to your actual sheet name. The loop will then affect only that worksheet.
Why does the macro not run when I open the file?
Save the workbook as an Excel Macro-Enabled Workbook (.xlsm), and click Enable Content or Enable Macros in the security warning when reopening.
Does this work in WPS Office the same way?
WPS Office can open Excel workbooks, but ActiveX controls and VBA may behave differently. For full ActiveX VBA behavior use Microsoft Excel, or test the workbook in WPS Office first.




