Fix an Excel Shape Button That Does Not Run a Macro
Question details
The user needs to identify why a macro assigned to an Excel shape button does not run.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- One shape button runs its macro, while another shape is intended to run the Large_Cups procedure.
- Observed behavior
- The second shape does nothing when clicked.
Open the workbook in desktop Excel and check that it is saved as a macro-enabled workbook, such as .xlsm. Only enable macros if you trust the workbook and its source.
Check the VBA procedure and reassign it to the shape
Use this method to verify that the shape points to a working procedure.
In desktop Excel, select Developer > Visual Basic to open the VBA editor. If the Developer tab is hidden, enable it through File > Options > Customize Ribbon.
In the VBA editor's Project Explorer, open the workbook's Modules folder and find Large_Cups. Confirm that its name is spelled correctly and that the procedure contains executable code.
If needed, choose Insert > Module in the VBA editor and place the procedure there as a public Sub with no required arguments, rather than as a worksheet event.
Return to the worksheet, right-click the affected shape, and choose Assign Macro. Select the correct Large_Cups procedure from the intended workbook, then click OK.
Click the shape and check whether the expected action occurs. If it still does nothing, return to the VBA editor and review the procedure for errors.

Check Excel's macro security settings
Use this check if the procedure and shape assignment are correct but macros are blocked.
Work with spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and support for common Excel formats, making it easy to move everyday spreadsheet work. It does not repair Excel's macro settings or shape assignments; VBA and macro support can vary by edition.

Frequently Asked Questions
Why does one Excel shape button work while another does nothing?
The second shape may be assigned to the wrong or an empty procedure. Right-click it, choose Assign Macro, and verify the selected macro, then inspect its code under Developer > Visual Basic.
Where should a macro assigned to a shape be stored?
Store it in a standard VBA module as a public Sub with no required arguments. In the VBA editor, choose Insert > Module to create a standard module if needed.
Why can't I find Large_Cups in the Assign Macro list?
Check that Large_Cups is a public Sub with no required arguments in a standard module and that its workbook is open. Also confirm that the procedure name is spelled correctly.
Can I run the shape macro in Excel for the web?
Excel for the web cannot run VBA macros. Open the workbook in desktop Excel and enable macros only if you trust the file.




