Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

To see if the workbook is already a member of the Workbooks collection

Function bIsWorkbookOpen(wkbName As String) As Boolean          Dim myWorkbook As Workbook          On Error Resume Next          Set myWorkbook = Workbooks(wkbName)          If Not myWorkbook Is Nothing Then          bIsWorkbookOpen = True          End If      End Function