Fix Excel Command Buttons After Hiding and Unhiding Columns
Question details
Restore Excel command buttons that stop responding after columns beneath them are hidden and unhidden, and reduce the chance of recurrence.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An Excel worksheet uses ActiveX command buttons positioned over columns that are sometimes hidden and unhidden.
- Observed behavior
- The buttons stop responding after the columns are hidden and unhidden. Recreating a control temporarily restores it.
Confirm that the affected buttons are ActiveX controls and that macros are enabled for the workbook if you trust its source. If the Developer tab is hidden, enable it through Excel's ribbon customization settings.
Clear the ActiveX Cache and Change the Button Placement
Use this approach to refresh temporary ActiveX control files and prevent the button from moving or resizing with cells.
ActiveX controls can be affected by cached control data or by changes to the worksheet layout. These steps address both possibilities, but may not prevent every recurrence.
Save and close the workbook, then exit Excel and any other open Microsoft Office applications.
On Windows, open File Explorer, enter %temp% in the address bar, and search for *.exd. Delete the matching temporary ActiveX cache files that are not in use; Office can recreate them when needed.
Reopen the workbook in Excel, select Developer > Design Mode, then right-click the affected button and choose Format Control.
On the Properties tab, select Don't move or size with cells and click OK. Turn off Developer > Design Mode, then hide and unhide the columns and test the button.
Replace the ActiveX Button with a Form Control
Use a Form Control as a workaround if the ActiveX button continues to fail after column layout changes.
Work with Excel Spreadsheets in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface for opening and editing spreadsheets. Its Excel format support makes it easy to move everyday workbook work to WPS, though it does not repair Microsoft Excel ActiveX controls.

Frequently Asked Questions
Why does my Excel command button stop responding after I unhide columns?
The issue may involve the ActiveX control's cached data or its positioning when the worksheet layout changes. Clear temporary EXD files and set the button to Don't move or size with cells, then test it again.
Where do I change an ActiveX button's placement?
In Excel, select Developer > Design Mode, right-click the button, and choose Format Control. On the Properties tab, select Don't move or size with cells.
Will deleting EXD files remove my button's VBA code?
No. EXD files are temporary ActiveX cache files, not the workbook's VBA code. Close Office applications before deleting them so the cache can be recreated.
Can I assign my existing ActiveX click event directly to a Form Control button?
Not directly. Move or adapt the intended actions into a public Sub in a standard VBA module, then select that procedure in the Form Control's Assign Macro dialog. ActiveX-specific code may need further changes.
What if I cannot see the Developer tab in Excel?
Open Excel's ribbon customization settings and enable Developer. You can then use Developer > Design Mode to edit an ActiveX button or Developer > Insert to add a Form Control.




