Move to specific sheet
How to move to a specific sheet using the Excel and VBA methods
METHOD 1. Move to specific sheet
EXCEL
Right-click on the sheet navigation area > Select the sheet > OK
1. Right-click on the sheet navigation area, located at the bottom left corner of the workbook. |
2. Select the sheet that you want to move to. 3. Click OK. Note: we are moving to Sheet4, therefore we have selected Sheet4 from the list of sheets. |
Sub Move_to_specific_sheet()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
inputfield = Application.InputBox("Sheet Name")
On Error Resume Next
If inputfield = False Then Exit Sub
Set ws = Sheets(inputfield)
If ws Is Nothing Then
Set ws = Sheets(inputfield)
If ws Is Nothing Then
MsgBox "Sheet does not existing in this workbook"
Else
ws.Activate
End If
End Sub
OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
ADJUSTABLE PARAMETERS
Input box default content: You can change the default input box content "Sheet Name".
Message Box: You can change the message "Sheet does not existing in this workbook" in the Message Box.
EXPLANATION
This tutorial explains and provides step by step instructions on how to move to a specific sheet using the Excel and VBA methods.
This tutorial explains and provides step by step instructions on how to move to a specific sheet using the Excel and VBA methods.
Excel Methods: Using Excel you can quickly move to a specific sheet by selecting the sheet from a list of existing sheets.
VBA Methods: Using VBA you can quickly move to a specific sheet by typing the name of the sheet in the input box.