logo
search
VBA & Macro Problems

How to Copy Excel Macro Buttons with a Worksheet

Algirdas JasaitisAlgirdas Jasaitis Sep 27, 2026 869 views

Question details

The user needs to know how to resolve an issue where macro buttons are not included when duplicating an Excel worksheet.

How to Copy Excel Macro Buttons with a Worksheet
Product
Microsoft Excel
Device & OS
not provided
Scenario
Duplicating an existing worksheet that contains macro buttons for further use.
Observed behavior
The macro buttons fail to copy over to the newly duplicated worksheet because an advanced object-copying setting has been disabled.
Before you start

Verify that your workbook is saved in a macro-enabled format (.xlsm) to prevent any potential loss of VBA code before modifying application settings.

Solution 1Recommended

Enable Object Copying in Advanced Options

Adjust the advanced settings in Excel to ensure that inserted objects, such as macro buttons, are duplicated alongside their parent worksheets.

Excel has specific configurations that control how objects behave during copy and paste operations. If this setting is disabled, objects like shapes, charts, and macro buttons will be left behind when you duplicate a worksheet.

1
Open Excel Options

Launch Microsoft Excel, click on the 'File' tab located in the top-left corner of the window, and select 'Options' from the bottom of the left sidebar.

2
Navigate to Advanced Settings

In the Excel Options dialog box that appears, click on 'Advanced' in the left-hand navigation pane.

3
Enable the Object Copy Setting

Scroll down to the 'Cut, copy, and paste' section. Check the box next to 'Cut, copy, and sort inserted objects with their parent cells'.

4
Duplicate the Worksheet

Click 'OK' to apply the changes. Right-click the worksheet tab you want to duplicate, select 'Move or Copy', check 'Create a copy', and click 'OK'. The macro buttons will now be copied successfully.

Enable Object Copying in Advanced Options
Unexpected Settings Changes: This setting can sometimes be disabled accidentally by a background software update or by another macro script running in Excel. Re-enabling it permanently restores normal worksheet duplication behavior.
Free Microsoft Office alternative

Try WPS Office for Seamless Macro and Worksheet Handling

If you frequently encounter broken application settings in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible alternative that effortlessly preserves your original Excel formats, worksheet objects, and macros without requiring constant manual adjustments.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your device.
  2. 2. Open Your Workbook: Launch WPS Spreadsheets and open your existing Excel workbook containing the macro buttons.
  3. 3. Duplicate Safely: Right-click the sheet tab and select 'Move or Copy' to seamlessly duplicate your worksheet and its assigned buttons out-of-the-box.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .xls.Flawlessly preserves worksheet objects, charts, and macro buttons during duplication.Familiar user interface ensuring a zero-learning-curve transition from Microsoft Office.Lightweight design that loads quickly and operates smoothly on both old and new devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why did my Excel macro buttons suddenly stop copying?

This typically occurs if the advanced object-copying setting in Excel was inadvertently disabled. This can happen due to unexpected software updates, accidental keystrokes, or background macro scripts temporarily modifying application-level settings.

Do I need to rewrite my VBA code if the macro button didn't copy?

No, your VBA code remains intact in the VBA Editor (accessible by pressing Alt + F11). You only need to fix the object-copying setting to duplicate the physical button on the sheet. Once copied, the new button will retain its original macro assignment.

Can I manually copy just the macro button to another sheet?

Yes. If you only need the button, you can Right-click or Ctrl-click the macro button to select it, press Ctrl+C to copy, navigate to the target worksheet, and press Ctrl+V to paste it manually.

How do I assign a macro to a newly copied button if it loses its connection?

If a copied button loses its assigned macro, right-click the button on your worksheet, select 'Assign Macro' from the context menu, choose your desired macro from the list provided, and click 'OK'.