Created
July 27, 2011 13:42
-
-
Save hoffstein/1109380 to your computer and use it in GitHub Desktop.
Excel find worksheet by name
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
Function FindWorksheet(sheetName As String) As Worksheet | |
Dim ws As Worksheet | |
For Each ws In ThisWorkbook.Worksheets | |
If ws.Name = sheetName Then Set FindWorksheet = ws | |
Next | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment