VBA & Macro Problems

Fix Excel Macro Buttons That Stop Working After Editing

Emma BrownEmma Brown Nov 14, 2026 868 views

Question details

Find out why assigned Excel macro buttons stop responding after a macro is edited and work again only after the workbook is reopened.

Fix Excel Macro Buttons That Stop Working After Editing
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user edits a VBA macro and then tries to run it using a button assigned in the workbook.
Observed behavior
The buttons do not respond until the workbook is saved, closed, and reopened.
Before you start

Save a copy of the macro-enabled workbook for testing, and note which buttons and macros are affected. Confirm that the file comes from a trusted source before enabling macros.

Solution 1Recommended

Check the VBA project and button assignment

Use these checks to rule out an interrupted macro, a compilation error, or a broken button assignment.

1
Reset and compile the code

Open Developer > Visual Basic. If the editor is in break mode, choose Run > Reset, then select Debug > Compile VBAProject and correct any reported errors.

2
Check the button assignment

For a Form Control button, right-click the button and select Assign Macro. Confirm that the intended macro is selected and click OK.

3
Check Design Mode

For an ActiveX button, open the Developer tab and turn off Design Mode before clicking the button. In Visual Basic, check that its Click event still calls the intended code.

4
Test the edited macro

Save the workbook as a macro-enabled file, edit the macro again, and click the button. If it still does not respond, test Excel without add-ins.

Check the VBA project and button assignment
Free Microsoft Office alternative

Work with Excel Spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility for a smoother move between office suites. It does not repair Excel's macro-button behavior; check VBA and ActiveX compatibility before relying on automated workbooks.

Open and edit spreadsheet content in a familiar interfaceCompatible with common Microsoft Excel formats such as XLSXReview workbook data while troubleshooting Excel automationUse a free, lightweight office suite
QA img-9

Frequently Asked Questions

Why do my macro buttons work again after I reopen the workbook?

Reopening resets the workbook and Excel session, but it does not identify the cause. Check for VBA errors with Developer > Visual Basic > Debug > Compile VBAProject, then test add-ins and startup files.

How do I check which macro a button runs?

For a Form Control button, right-click it and select Assign Macro. For an ActiveX button, inspect its Click event in Developer > Visual Basic and make sure Developer > Design Mode is off.

Where can I find Excel's XLSTART folder?

Open Developer > Visual Basic, press Ctrl+G, enter ?Application.StartupPath in the Immediate Window, and press Enter. Excel displays its startup folder path.

What should I do if the issue cannot be reproduced without seeing the workbook?

Create a test copy, remove confidential information, and share it through an approved file-sharing service with someone who can inspect the VBA project and button controls.