An implementation of Visual Basic that is built into Microsoft products.
The workbook was saved as .xlsx
.xlsx files cannot store macros.
Save as Excel Macro-Enabled Workbook (*.xlsm).
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
this error was showing
An implementation of Visual Basic that is built into Microsoft products.
The workbook was saved as .xlsx
.xlsx files cannot store macros.
Save as Excel Macro-Enabled Workbook (*.xlsm).
Hi @r,
Thanks for reaching out.
This means the button is linked to a macro that Excel can no longer find, or macros are currently disabled for the file.
The first thing I’d recommend is reopening the workbook and checking if Excel shows an Enable Content prompt at the top. If it does, please click that first and then test the button again.
If the same message still comes up, right-click the button and select Assign Macro. From there, check whether the button is pointing to a macro named Sheet3_Button1_Click. If that name is listed but the macro is missing, the button will need to be reassigned to the correct macro, or that macro will need to be recreated in the workbook.
You can confirm this in the VBA editor by pressing Alt + F11. If the button was inserted as a regular Forms button, the macro should be stored in a standard module. If it was added as an ActiveX button, the click code should be inside the sheet where the button exists. Also make sure the workbook is saved as an .xlsm file, since Excel will not run embedded macros properly from a non-macro-enabled format.
If it still does not work after that, the next step would be to test the macro directly in the VBA editor and then create a new button in the workbook to rule out the current button being corrupted. If needed, moving the content into a new .xlsm workbook can also help confirm whether the issue is with the original file itself rather than the macro assignment.
Hope this helps! If my explanation and the information I provided were helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.
please check your vba code. may be nothing inside the code block.
The error message indicates that Excel cannot find or execute the macro Sheet3_Button1_Click in Excel codeing.xlsm. This usually happens for one of these reasons:
Alt + F11 to open the VBA editor.VBAProject (Excel codeing.xlsm) → Microsoft Excel Objects → Sheet3. Private Sub Button1_Click()
' or
Public Sub Button1_Click()
Sub in a module (not a sheet) and the name in the Assign Macro dialog must match exactly.Sheet3 code module, not in a standard module.Insert → Module), not in Sheet3.File → Options → Trust Center → Trust Center Settings → Macro Settings, and choose a setting that allows macros for trusted documents.After ensuring macros are enabled and the button is correctly assigned to an existing Sub with the exact same name, the error should no longer appear.
References: