Go To / Move Worksheet - VBA @pp_92

PHOTO EMBED

Mon Feb 21 2022 12:54:55 GMT+0000 (Coordinated Universal Time)

Saved by @pharehphatah #vba

Private Sub MoveSheetRight()
'MOVE WORKSHEET TO RIGHT'

Dim s As Worksheet
Set s = ActiveSheet

If s.Next Is Nothing Then Exit Sub
s.Move after:=s.Next

End Sub



Private Sub MoveSheetLeft()
'MOVE WORKSHEET TO LEFT'

Dim s As Worksheet
Set s = ActiveSheet

If s.Previous Is Nothing Then Exit Sub
s.Move before:=s.Previous

End Sub



Private Sub ActiveSheetbyCount()
'GO TO ACTIVE WORKSHEET TO RIGHT STEP TO STEP'

If ActiveSheet.Index < ThisWorkbook.Sheets.Count Then
Sheets(ActiveSheet.Index + 1).Activate
    Else
    Sheets(1).Activate
End If

End Sub



Private Sub GoTolastSheet()
'GO TO ACTIVE WORKSHEET TO LAST SHEET - RIGHT'

On Error Resume Next
Sheets(Sheets.Count).Select

End Sub



Private Sub GoToFirstSheet()
'GO TO ACTIVE WORKSHEET TO LAST SHEET - LEFT'

On Error Resume Next
Sheets(1).Select

End Sub
content_copyCOPY

Report - MI Combine For Pending Bag

https://www.extendoffice.com/documents/excel/3501-excel-jump-to-first-tab.html