hi people, today, i discovered this function. it is very usefull, thanks to the authors.
the link to the function is here.
and the function is here:
Function WorkbookOpen(WorkBookName As String) As Boolean
' returns TRUE if the workbook is open
WorkbookOpen = False
On Error GoTo WorkBookNotOpen
If Len(Application.WorkBooks(WorkBookName).Name) > 0 Then
WorkbookOpen = True
to call this function, use for example:
If Not WorkbookOpen("MyWorkbookName.xls") Then