Fix "Method or Data Member Not Found" for Excel ActiveX Checkboxes
Question details
A Worksheet_Change VBA procedure fails with a 'Method or data member not found' error when referencing a specific checkbox in a single workbook.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user is running a VBA Worksheet_Change event macro that attempts to read or modify the state of a checkbox.
- Observed behavior
- The VBA execution halts, throwing a compile error stating 'Method or data member not found,' specifically highlighting the checkbox reference like Me.chkbx_CY_CODA_Store.
Ensure your workbook is saved as a Macro-Enabled Workbook (.xlsm) and that you have enabled macros in the Trust Center settings before editing the VBA code.
Verify Control Type and Update the VBA Reference
Differentiate between ActiveX controls and Form controls, as they require distinct VBA syntax to function properly.
Excel offers two types of checkboxes: Form Controls and ActiveX Controls. The 'Method or data member not found' error frequently occurs when a Form Control is mistakenly referenced using ActiveX syntax.
Go to the Developer tab, enable 'Design Mode', and right-click the problematic checkbox to view its properties. If it has an extensive Properties window, it is an ActiveX control.
If the checkbox is indeed an ActiveX control, ensure your VBA reference uses the format Me.YourCheckboxName (e.g., Me.chkbx_CY_CODA_Store).
If the checkbox is a Form Control, change your VBA code to use Me.CheckBoxes("YourCheckboxName") instead of using the Me.ControlName format.

Check for Naming Conflicts and Corrupted Controls
Resolve issues caused by conflicting names in the workbook or a corrupted ActiveX control object.
Try WPS Office for Seamless Macro Compatibility
If you are experiencing persistent VBA errors with ActiveX controls in Microsoft Excel, consider trying WPS Office. WPS Spreadsheet offers excellent compatibility with Microsoft Excel formats, including Macro-Enabled Workbooks, within a lightweight and free productivity suite.
- 1. Download WPS Office: Visit the official WPS website and click 'Download WPS Office Free' to install the suite.
- 2. Open Your Workbook: Launch WPS Spreadsheet and open your .xlsm file to manage your spreadsheets.
- 3. Enable Macros: If prompted by the security warning, click 'Enable Macros' to allow your allowed VBA scripts to run.

Frequently Asked Questions
Why does my VBA code work in one workbook but not another?
This often happens due to corrupted ActiveX controls, missing references in the VBA project, or subtle differences in control names between the workbooks. Replacing the control in the affected workbook usually fixes the issue.
What is the difference between Form Controls and ActiveX Controls in Excel?
Form Controls are simpler, integrated directly into the worksheet, and require references like Me.CheckBoxes("Name"). ActiveX Controls offer more formatting and event options (like Worksheet_Change) and are referenced directly as objects, such as Me.ControlName.
How do I find the true name of my ActiveX checkbox?
Go to the Developer tab on the ribbon, click 'Design Mode', select the checkbox, and click 'Properties'. The true name used for VBA referencing is listed in the '(Name)' field at the top of the Properties window.




