Fix an Excel ActiveX Button That Does Not Run VBA Code
Question details
An Excel ActiveX button does not respond to clicks even though its VBA code runs from the editor.

- Product
- Microsoft Excel
- Device & OS
- Windows (Surface reported)
- Scenario
- The workbook is moved between monitors that use different display scaling settings.
- Observed behavior
- Clicking the ActiveX command button does not trigger its VBA code, while running the code from the VBA editor works.
Connect the monitors you normally use and check the scaling percentage for each one in Windows Display settings. Open the workbook in Excel and confirm that the button is an ActiveX control.
Match the Display Scaling on All Monitors
Use this fix when the button stops responding after the workbook is moved between displays with different scaling settings.
Right-click the Windows desktop and select Display settings.
Select each display in the diagram and look at Scale under Scale & layout.
Choose the same Scale percentage for each connected monitor. In the reported case, changing the third monitor from 150% to 125% resolved the issue.
Return to Excel and click the ActiveX button. If needed, close and reopen Excel before testing again.

Restart Windows and Reconnect External Monitors
Try reconnecting the displays if matching their scaling does not restore the button.
Check Excel Design Mode and Macro Settings
Check these settings if the button remains unresponsive after adjusting the displays.
Work with Spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office documents. It can help you move everyday spreadsheet work to WPS, but it does not fix Excel's ActiveX issue, and ActiveX controls or VBA macros may not work the same way.

Frequently Asked Questions
Why does the VBA code run in the editor but not when I click the button?
The code itself may run while the button fails to receive the click. Different monitor scaling settings were the cause in the reported case; Design Mode or security restrictions can also prevent normal use.
Where can I check each monitor's scaling?
Right-click the Windows desktop, select Display settings, and select each monitor in the display diagram. Check Scale under Scale & layout.
How do I know if Excel is in Design Mode?
Open the Developer tab and look at the Design Mode button. Turn it off before testing an ActiveX button.
Can WPS Office fix an Excel ActiveX button?
No. The display-scaling and ActiveX problem must be addressed in Windows or Excel. WPS Office can open and edit many Excel files, but ActiveX controls and VBA macros may not behave the same way.




