Quickly Switch Between Worksheets in Excel using Shortcut (Alt+Backtick)

Copy this to your PERSONAL.XLSB to quickly switch between Worksheets on the ActiveWorkbook

me@jaykilleen.com wrote this almost 7 years ago and it was last updated almost 7 years ago.


← Back to the Posts

PERSONAL.XLSB ThisWorkbook

Private Sub Workbook_Open()
  Application.OnKey "%+`", "PrevWorksheet"
  Application.OnKey "%`", "NextWorksheet"
End Sub

PERSONAL.XLSB Module1 OR whatever you rename it to :)

Public wb As Workbook
Public wbCount As Integer
Public wsCurrent As Integer
Public x As Integer

Sub Init()
  Set wb = ActiveSheet.Parent
  wbCount = wb.Sheets.Count
  wsCurrent = ActiveSheet.Index
End Sub

Sub NextWorksheet()
  Init
  If wsCurrent = wbCount Then
    wb.Sheets(1).Activate
    Exit Sub
  End If
  wb.Sheets(wsCurrent + 1).Activate
End Sub

Sub PrevWorksheet()
  Init
  If wsCurrent = 1 Then
    wb.Sheets(wbCount).Activate
    Exit Sub
  End If
  wb.Sheets(wsCurrent - 1).Activate
End Sub