logo
search
VBA & Macro Problems

Fix Ctrl+Page Up Inserting Macro Sheets in Excel Instead of Switching Tabs

Emma BrownEmma Brown Sep 28, 2026 869 views

Question details

The user wants to navigate between Excel worksheet tabs using the Ctrl+Page Up shortcut without accidentally creating new macro sheets.

Fix Ctrl+Page Up Inserting Macro Sheets in Excel Instead of Switching Tabs
Product
Microsoft Excel
Device & OS
not provided
Scenario
Using standard keyboard shortcuts to navigate between multiple worksheets in a workbook.
Observed behavior
Pressing Ctrl+Page Up does not switch to the left tab; instead, it inserts new worksheets named Macro1, Macro2, and so forth.
Before you start

Save your current workbook and ensure you have administrative permissions in case you need to modify or disable installed COM add-ins.

Solution 1Recommended

Clear Conflicting Application.OnKey Assignments in VBA

Identify and remove any custom VBA scripts or macros that are intercepting the Ctrl+Page Up shortcut.

Often, a macro running in the background uses the Application.OnKey method to hijack default shortcuts. Removing or disabling this code will restore standard navigation.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) Editor.

2
Search for OnKey Assignments

Press Ctrl + F to open the Find dialog. Search your entire project for the term 'Application.OnKey'.

3
Disable the Conflicting Code

Look for lines of code assigning a macro to '^{PGUP}' (the VBA key code for Ctrl+Page Up). Comment out the line by adding an apostrophe (') at the very beginning.

4
Save and Test

Save your VBA project, close the editor, and return to Excel to test if the shortcut now correctly switches tabs.

Clear Conflicting Application.OnKey Assignments in VBA
Shortcut Restored: If a background macro was the culprit, commenting out the OnKey assignment will immediately restore normal tab navigation.
Free Microsoft Office alternative

Experience Smooth and Glitch-Free Spreadsheets with WPS Office

If macro conflicts and add-in glitches are slowing down your work in Microsoft Excel, consider switching to WPS Office. It provides a fast, lightweight, and highly compatible environment with stable shortcuts for all your spreadsheet tasks.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
  2. 2. Install WPS Office: Run the downloaded installer and follow the on-screen prompts to complete the setup.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing Excel files to enjoy seamless, conflict-free editing.
Fully compatible with Microsoft Excel formats including .xlsx, .xls, and .xlsmReliable default keyboard shortcuts for rapid and seamless tab navigationLightweight design that minimizes third-party add-in conflictsFree to use with a familiar user interface requiring zero learning curve
QA img-9

Frequently Asked Questions

What is the default shortcut to switch tabs in Excel?

The default keyboard shortcuts to navigate between worksheet tabs are Ctrl + Page Down to move to the next sheet (to the right) and Ctrl + Page Up to move to the previous sheet (to the left).

Why did my Excel suddenly start creating Macro1 sheets?

This behavior typically occurs when a background macro, an active Excel add-in, or third-party software intercepts the keyboard shortcut. The hijacked shortcut triggers a legacy 'Insert Macro Sheet' command instead of its default navigation behavior.

Can a standard Excel add-in cause shortcut conflicts?

Yes. Both standard Excel Add-ins (.xlam) and COM Add-ins can contain VBA code that uses the Application.OnKey method to silently override default keyboard shortcuts without your knowledge.

How do I safely delete the accidentally created Macro1 sheets?

Right-click the tab named Macro1 (or Macro2) at the bottom of your Excel window and select 'Delete' from the context menu. If prompted, confirm the deletion to permanently remove the unwanted sheet.