Function blnWBExist(ByVal strWbName As String) As Boolean
Dim wkbName As Workbook
For Each wkbName In Workbooks
If wkbName.Name = strWbName Then
blnWBExist =True
Exit For
End If
Next wkbName
Set wkbName = Nothing
End Function
Function blnExistWB(ByVal strWbName As String) As Boolean
Dim wkbName As Workbook
On Error Resume Next
Set wkbName = Workbooks(strWbName)
If Err.Number =0 Then blnExistWB =True
Set wkbName = Nothing
End Function