Created
August 1, 2017 08:07
-
-
Save ndthanh/463b804e8125987bb905606a597a99df to your computer and use it in GitHub Desktop.
This file contains 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 SheetExists(shtName As String, Optional wb As Workbook) As Boolean | |
Dim sht As Worksheet | |
If wb Is Nothing Then Set wb = ThisWorkbook | |
On Error Resume Next | |
Set sht = wb.Sheets(shtName) | |
On Error GoTo 0 | |
SheetExists = Not sht Is Nothing | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment