There is no provision for iterating through instances of excel. If you just
want to know if the file is open at all, you can determine that, but not by
iterating instances. If you want to work with the open file in an unknown
instance, there is no provision for it.

Signature
Regards,
Tom Ogilvy
> Using VBA in open Excel workbook I want to determine if a specific workbook
> is already open. The complication is that multiple Excel processes may
[quoted text clipped - 5 lines]
>
> Thanks in advance for any ideas.
hzgt9b@nopost.com - 12 Oct 2005 13:28 GMT
THanks for the quick response
Ok, can you give me an example code snippet of "...know if the file is open
at all"
> There is no provision for iterating through instances of excel. If you just
> want to know if the file is open at all, you can determine that, but not by
[quoted text clipped - 13 lines]
> >
> > Thanks in advance for any ideas.
Tom Ogilvy - 12 Oct 2005 14:45 GMT
http://support.microsoft.com?kbid=138621
XL: Macro Code to Check Whether a File Is Already Open
http://support.microsoft.com?kbid=291295
XL2002: Macro Code to Check Whether a File Is Already Open
http://support.microsoft.com?kbid=213383
XL2000: Macro Code to Check Whether a File Is Already Open
http://support.microsoft.com?kbid=184982
WD97: VBA Function to Check If File or Document Is Open

Signature
Regards,
Tom Ogilvy
> THanks for the quick response
>
[quoted text clipped - 18 lines]
> > >
> > > Thanks in advance for any ideas.
hzgt9b@nopost.com - 12 Oct 2005 15:02 GMT
Many thanks for the help
> http://support.microsoft.com?kbid=138621
> XL: Macro Code to Check Whether a File Is Already Open
[quoted text clipped - 36 lines]
> > > >
> > > > Thanks in advance for any ideas.
Mats Samson - 01 Nov 2005 21:16 GMT
Hi,
I don't know if you already solved the matter but anyhow,
I use the following to check if the WB is open:
Sub OpenMyBook()
Dim bk As Workbook
On Error Resume Next
Set bk = Workbooks("MyBook1.xls")
On Error GoTo 0
If Not bk Is Nothing Then
Workbooks("MyBook1").Activate
Else
ChDir ("Path")
Workbooks.Open ("MyBook1.xls")
End If
Workbooks("MyBook1").Activate
End Sub
Best regards
Mats
> Many thanks for the help
>
[quoted text clipped - 38 lines]
> > > > >
> > > > > Thanks in advance for any ideas.
Jac Tremblay - 28 Feb 2007 16:05 GMT
Hi Tom,
This post and your reply answered my question and solved my problem.
Thank you.

Signature
Jac Tremblay
> http://support.microsoft.com?kbid=138621
> XL: Macro Code to Check Whether a File Is Already Open
[quoted text clipped - 36 lines]
> > > >
> > > > Thanks in advance for any ideas.