View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Looping Through Every Instance of Excel

some have suggested:

set xlapp=getobject(,"fully qualified workbookname").Parent

--
Regards,
Tom Ogilvy

" wrote:

Hello,
I want to loop through every instance of excel and find an open
workbook, I tried this:

For i = 1 To app.workbooks.Count + 1
z = app.workbooks(i).Name
If InStr(app.workbooks(i).Name, "STXL") Then
WB_Found = True
Exit For
End If
Next

Unfortunately, this only finds the open workbooks within each
individual instance. Is this even possible?

Clay