VBA & Macro Problems

Move an Excel Worksheet to the Front with a Keyboard Shortcut

Kushani NimanthikaKushani Nimanthika Nov 20, 2026 869 views

Question details

The user wants a keyboard shortcut that moves the active Excel worksheet to the first position in a workbook.

Move an Excel Worksheet to the Front with a Keyboard Shortcut
Product
Microsoft Excel
Device & OS
not provided
Scenario
Reorder workbook sheets without dragging the active sheet tab to the front.
Observed behavior
Excel does not commonly provide a built-in shortcut for moving the active worksheet directly to the first position.
Before you start

Open the workbook in desktop Excel and make sure its structure is not protected. To keep the macro in the workbook, save it as an Excel Macro-Enabled Workbook (.xlsm).

Solution 1Recommended

Assign a Shortcut to a VBA Macro That Moves the Active Sheet

Use a VBA macro to move the active sheet before the first sheet, then assign a shortcut to run it.

The macro leaves the sheet in place if it is already first. VBA macros require desktop Excel and cannot be run in Excel for the web.

1
Open the VBA editor

In desktop Excel, select Developer > Visual Basic. On Windows, you can also press Alt+F11.

2
Insert a module

In the VBA editor, select the workbook in the Project pane, then choose Insert > Module.

3
Add the macro

Paste the following code into the module: Sub Send_To_Front() If ActiveSheet.Index > 1 Then ActiveSheet.Move Before:=Sheets(1) End If End Sub

4
Assign a shortcut

Return to Excel and select Developer > Macros. Choose Send_To_Front, select Options, and enter a shortcut key. Choose a combination that does not override a shortcut you use.

5
Run the shortcut

Select the worksheet tab you want to move, then press your assigned shortcut. The active sheet moves to the first position.

Macro access: Save the workbook as .xlsm and enable macros when prompted if you trust the file. Macro availability and shortcut options can vary by Excel platform.
Free Microsoft Office alternative

Reorder Workbook Sheets in WPS Spreadsheet

WPS Office is a free, lightweight Office alternative with a familiar interface and support for Excel formats, making it easy to bring existing workbooks into WPS Spreadsheet. You can reorder sheets by dragging their tabs; WPS does not fix Excel's missing shortcut.

Drag worksheet tabs to change their orderOpen and edit common Excel formats, including .xlsx and .xlsUse a familiar spreadsheet interfaceWork with existing Office files in a lightweight suite
microsoft office alternative - wps office

Frequently Asked Questions

Does Excel have a built-in shortcut to move a worksheet to the first position?

Excel does not commonly provide a direct built-in shortcut for this action. In desktop Excel, you can assign a shortcut to a VBA macro through Developer > Macros > Options.

Why won't the macro move my worksheet?

Check whether the workbook structure is protected under Review > Protect Workbook. Also make sure macros are enabled for the trusted workbook and that the worksheet you want to move is active.

Can I run this macro in Excel for the web?

No. Excel for the web cannot run VBA macros. Open the workbook in desktop Excel to create and run the shortcut.

How do I keep the macro when I save the workbook?

Select File > Save As and choose Excel Macro-Enabled Workbook (.xlsm). Saving as .xlsx does not retain VBA macros.