''
***************************************************************************
'' Purpose : Test if a specific file is open
'' Written : 29-Jun-2001 by Andy Wiggins
'' Syntax : IsWindowOpen("FileName.Xls")
'' Returns : "True" or "False"
''
Function IsWindowOpen(pstr_WindowName As String)
Dim w As Window
For Each w In Windows
If w.Caption = pstr_WindowName Then
IsWindowOpen = True
Exit Function
End If
Next
IsWindowOpen = False
End Function
--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"