View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default How to Do this Test in VBA?

If a workbook is open then it is part of the Workbooks.Collection read thru
the collection and if you find it you have the answer e.g......

Dim wB As Workbook
For Each wB In Workbooks
If wB.Name = "Book1" Then
MsgBox "My Workbook " & wB.Name & " is Open"
Else
MsgBox "Not Found!"
End If
Next


--
Cheers
Nigel



"David Godinger" wrote in message
...
How do I make VBA ask if a certain Excel file is already loaded (meaning
already in RAM)?

Thanks,

Dave

Please delete "ANTI-SPAM" from email address: