VBA & Macro Problems

Fix Excel Command Buttons After Hiding and Unhiding Columns

Phi Hung VoPhi Hung Vo Nov 14, 2026 869 views

Question details

Restore Excel command buttons that stop responding after columns beneath them are hidden and unhidden, and reduce the chance of recurrence.

Fix Excel Command Buttons That Stop Working After Hiding Columns
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.
Before you start

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.

Solution 1

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.

1
Close Office applications

Save and close the workbook, then exit Excel and any other open Microsoft Office applications.

2
Delete temporary EXD files

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.

3
Open the button settings

Reopen the workbook in Excel, select Developer > Design Mode, then right-click the affected button and choose Format Control.

4
Change placement

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.

Check other buttons: Repeat the placement change for each affected ActiveX button. Deleting EXD files refreshes cached control data; it does not delete the button or its VBA code.
Free Microsoft Office alternative

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.

Open and edit common Microsoft Excel formats, including XLSX and XLSUse a familiar spreadsheet interface for everyday workbook tasksWork with a free, lightweight alternative to Microsoft OfficeContinue editing worksheet data without relying on an affected Excel button
microsoft office alternative - wps office

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.