VBA & Macro Problems

How to Assign One Excel Button to Run Multiple Macros in WPS Office

Ayan MasoodAyan Masood Nov 13, 2026 869 views

Question details

The user needs to configure a single worksheet button to execute several Excel VBA macros in sequence.

How to Assign One Excel Button to Run Multiple Macros in WPS Office
Product
WPS Office Spreadsheet
Device & OS
not provided
Scenario
A worksheet contains multiple VBA macros, and the user wants one button to launch all of them in a defined order.
Observed behavior
The button currently runs only one macro, so the remaining macros must be triggered manually.
Before you start

Open the workbook in WPS Office Spreadsheet and make sure the Developer tab is visible. Confirm that the macros you want to combine already exist in the same workbook and that macro execution is permitted.

Solution 1Recommended

Create a Wrapper Macro and Assign the Worksheet Button to It

Use this when you need one click to run multiple existing macros in a fixed order.

A wrapper macro is a short Sub procedure that uses Call statements to invoke the other macros one after another. Assigning the button to this wrapper keeps the individual macros unchanged and lets you control the execution order centrally.

1
Open the VBA editor

Open the workbook in WPS Office Spreadsheet and press Alt + F11. If the Developer tab is visible, you can also click Developer > Visual Basic.

2
Insert a standard module

In the Visual Basic editor, click Insert > Module. A new module opens where you can place the wrapper procedure.

3
Write the wrapper macro

Type Sub RunAllMacros() and press Enter. Then enter Call Macro1, Call Macro2, Call Macro3, and Call Macro4 on separate lines, followed by End Sub. Replace the names with your actual macro names.

4
Save the VBA project

Press Ctrl + S or click File > Save to save the workbook in a macro-enabled format such as .xlsm if WPS prompts you.

5
Assign the button to the wrapper

Return to the worksheet, right-click the worksheet button or shape, choose Assign Macro, select RunAllMacros, and click OK.

Create a Wrapper Macro and Assign the Worksheet Button to It
Button ready: One click on the worksheet button now runs Macro1, Macro2, Macro3, and Macro4 in the order listed in the wrapper.

Run Multiple Macros with One Button in WPS Office

WPS Office lets you combine several VBA macros into a single wrapper procedure and assign it to a worksheet button, so you can run a whole macro sequence with one click.

  1. 1. Open your macro workbook: Launch WPS Office Spreadsheet, open the workbook that contains the macros, and enable macros if prompted.
  2. 2. Create the wrapper procedure: Press Alt + F11 to open the VBA editor, click Insert > Module, and create a procedure such as Sub RunAllMacros() that calls each macro in sequence.
  3. 3. Add and assign the button: On the worksheet, insert a button or shape, right-click it, choose Assign Macro, select RunAllMacros, and click OK.
  4. 4. Test the sequence: Click the button once and confirm that all called macros run in the order you specified.
Execute multiple Excel VBA macros in order from a single buttonFull compatibility with .xls, .xlsm, and macro-enabled Excel workbooksFamiliar Excel-like ribbon and VBA editor make the transition easyFree to use, with no subscription required for core macro tasks
microsoft office alternative - wps office

Frequently Asked Questions

Can I assign multiple macros directly to one Excel button?

No. The Assign Macro dialog accepts only one macro name. Create a wrapper macro that uses Call statements for each macro, then assign the wrapper to the button.

How do I open the VBA editor in WPS Office?

Press Alt + F11, or enable the Developer tab and click Developer > Visual Basic.

Does the order of Call statements control the macro sequence?

Yes. Macros run from the first Call statement to the last, so place them in the desired execution order.

Can I use this method with a shape instead of a form control button?

Yes. Right-click any button, shape, or image, choose Assign Macro, and select the wrapper macro.

Do the individual macros need to be in the same module?

No. The wrapper can call public macros stored in any module in the same workbook.