Fix an Excel Macro Button That Only Works When a Ghost Button Is Clicked
Question details
The user needs an Excel macro button to respond when the visible button is clicked rather than at an offset location.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A workbook with command buttons is used across a laptop display and an external monitor, potentially through a docking station.
- Observed behavior
- A button appears offset or duplicated, and the macro runs only when a ghost button or another location is clicked.
Note which display shows the problem and whether the laptop is connected to a dock. Check whether the affected button is an ActiveX or Forms control before attempting to replace it.
Test the Workbook on the Laptop Display
Use this workaround to check whether the external display or dock is causing the button misalignment.
Drag the Excel window onto the primary laptop display, then click the visible macro button to test it.
If the button is still offset, disconnect the external monitor or undock the laptop, then test the button again.
Open your device's display settings and compare the scaling settings for the laptop and external monitor. If possible, use consistent scaling, then reopen the workbook and test the button on each screen.

Replace an ActiveX Button with a Forms Button
Try a Forms control if the affected button is ActiveX and continues to misalign across displays.
Work with Spreadsheets in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for Microsoft Excel formats, making it easier to move everyday spreadsheet work. Test macro-enabled workbooks and controls before relying on them, as compatibility can differ from Excel.

Frequently Asked Questions
Why does my Excel button respond in the wrong location?
Different display scaling settings or a docking setup can cause controls to appear misaligned. Move Excel to the laptop display and test the button, then compare scaling in your device's display settings.
How can I tell if the button is an ActiveX control?
On Excel's Developer tab, turn on Design Mode and right-click the button. If the menu includes Properties, the button is an ActiveX control.
Can I assign ActiveX click code directly to a Forms button?
Not necessarily. A Forms button needs a callable macro; ActiveX click-event code may need to be moved or adapted to a public procedure in a standard VBA module. Then select the procedure in the button's Assign Macro dialog.
What should I do if the button works only after undocking?
Test the workbook on the laptop display without the dock. If the issue returns when you reconnect it, use the laptop display as a workaround and compare the scaling settings of the connected displays.




