View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default "For each w in workbooks "can't find ".dat" open excel sheets,

Try the below...Sorry, right now I am unable to try this in 2007...

Sub Macro()
Dim win As Window
For Each win In Application.Windows
MsgBox win.Parent.Name
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Ricky" wrote:

I use "for each w in workbooks --- Next w" to find all open workbooks. It
doesn't seem to find .dat files opened in excel, but will find .csv files
opened in excel. How do I find all open files that have been opened by
excel2007? It seems to work fine on older excel software.