Try
Function IsFileOpen(Filename As String) As Boolean
Dim WB As Workbook
For Each WB In Workbooks
If WB.Name = Filename Or WB.FullName = Filename Then
IsFileOpen = True
Exit For
End If
Next WB
End Function
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Bill" wrote in message
...
I have a macro that is opening and closing several workbooks for
my Month
End reports. One of the workbooks treats and places data
slightly differently
than all the other ones, and needs different formatting
instructions for that
data.
I want to check if that specific filename is open. Is there a
specific
command for that???
(I could create a flag that is on or off when the file is
opened or closed,
and check that flag for true/false, but I wanted to know if
there is a
command to do this)