VBA & Macro Problems

Fix "Method or Data Member Not Found" for Excel ActiveX Checkboxes

Olivia MillerOlivia Miller Oct 26, 2026 869 views

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.

Fix "Method or Data Member Not Found" for Excel ActiveX Checkboxes
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.
Before you start

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.

Solution 1Recommended

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.

1
Check the control type

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.

2
Reference ActiveX controls correctly

If the checkbox is indeed an ActiveX control, ensure your VBA reference uses the format Me.YourCheckboxName (e.g., Me.chkbx_CY_CODA_Store).

3
Reference Form controls correctly

If the checkbox is a Form Control, change your VBA code to use Me.CheckBoxes("YourCheckboxName") instead of using the Me.ControlName format.

Verify Control Type and Update the VBA Reference
Syntax check: Matching the correct VBA syntax to the specific control type immediately resolves the majority of 'data member not found' compile errors.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and click 'Download WPS Office Free' to install the suite.
  2. 2. Open Your Workbook: Launch WPS Spreadsheet and open your .xlsm file to manage your spreadsheets.
  3. 3. Enable Macros: If prompted by the security warning, click 'Enable Macros' to allow your allowed VBA scripts to run.
Fully compatible with Microsoft Excel file formats (.xlsx, .xlsm, .xls)Familiar user interface for a seamless migration with zero learning curveLightweight application that runs smoothly even on older devicesRobust support for complex data analysis and standard spreadsheet tasks
microsoft office alternative - wps office

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.