Hi Hack,
I have been using the following.
VB Code:
Function WorksheetExists(TWbk As String, WName As String) As Boolean
' Returns True if a worksheet WName exists in Workbook TWbk
Dim Counter As Long
WorksheetExists = False
Counter = 1
Do
' The Worksheet names are Case Insensitive, hence the
' Upper Case conversion in the comparison.
If UCase(WName) = UCase(Workbooks(TWbk).Worksheets(Counter).Name) Then
WorksheetExists = True
Exit Do
End If
If Counter = Workbooks(TWbk).Worksheets.Count Then
Exit Do
End If
Counter = Counter + 1
Loop
End Function
Someone else might be able to come up with a more elegant solution but I know this one works.