VBA & Macro Problems

Fix an Excel Shape Button That Does Not Run a Macro

Kushani NimanthikaKushani Nimanthika Dec 2, 2026 869 views

Question details

The user needs to identify why a macro assigned to an Excel shape button does not run.

Fix an Excel Shape Button That Does Not Run a Macro
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.
Before you start

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.

Solution 1Recommended

Check the VBA procedure and reassign it to the shape

Use this method to verify that the shape points to a working procedure.

1
Open the VBA editor

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.

2
Inspect the procedure

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.

3
Use a standard module

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.

4
Assign the macro

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.

5
Test the button

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 the VBA procedure and reassign it to the shape
Free Microsoft Office alternative

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.

Open and edit common Microsoft Excel formats, including XLSX.Use familiar spreadsheet tools for everyday workbook tasks.Move existing spreadsheets into a lightweight office suite.Check VBA and macro compatibility before relying on shape buttons in a workbook.
microsoft office alternative - wps office

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.