title: Count number of opened Excel Workbooks
body: <p>I need to know how many Excel files are opened, so in case there are more than two, I can close the last one. How can I get number the of opened files?? I have read Worksbooks.Count... but I´m not getting anything at all. I´m using vbscript code.</p>
  
  <p>I have tried this... but just get the name of the file.</p>
  
  <pre><code>Set objExcel = GetObject(, "Excel.Application")
  Set WB = objExcel.ActiveWorkbook
  WScript.Echo "Hello" + WB.Name
  WScript.Echo "number of excel" + WB.Count
  </code></pre>