title: Check if a specific Excel file is open when several Excel files are open and activate it
body: <p>Edit: Before I put a specific Excel file or its window to the front I need to check whether it's running/still open.</p>
  
  <p>Old Question:
  I want to set a specific Excel window to the front.</p>
  
  <p>With this VBScript code I can activate one single Excel window by its name. But since more than one Excel window are opened it doesn't work anymore. In this case it won't find the needed window and it can't be checked if it's open. So it will always say that the ExcelFileName is not open.</p>
  
  <pre><code>Set WshShell = WScript.CreateObject ("WScript.Shell")
  if WshShell.AppActivate(ExcelFileName) = True then
      wscript.echo ExcelFileName &amp; " is opened."
      WshShell.sendkeys "%x" 'in Excel 2003 this would had opened the extra-menu-droplist of the menu-bar. Now it just activates Excel.
  else
      wscript.echo ExcelFileName &amp; " is not open."
  End if
  </code></pre>
  
  <p>How can I make it work with more than one opened Excel window?</p>