Created
October 1, 2020 13:14
-
-
Save s-hiiragi/8c4f7ebfa8ef3f80deb147b8a2e9999f to your computer and use it in GitHub Desktop.
指定したシートにジャンプするExcel VBAマクロ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub 指定したシートにジャンプ() | |
Dim SheetPattern As String | |
Dim s As Variant | |
SheetPattern = LCase(InputBox("シート名を入力", "指定したシートにジャンプ", "")) | |
If SheetPattern = "" Then | |
Exit Sub | |
End If | |
For Each s In ActiveWorkbook.Sheets | |
If LCase(s.Name) Like SheetPattern Then | |
s.Activate | |
Exit For | |
End If | |
If InStr(LCase(s.Name), SheetPattern) > 0 Then | |
s.Activate | |
Exit For | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment