<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Excel not quitting properly from macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453219#M1153895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do certain excel reports via QlikView macros. They create the reports and then quit excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still have instances of EXCEL.EXE*32 showing up in my task manager's processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These reports run automatically every morning, so every few days I find myself opening TM and ending up to 5 or 10 instances of excel, even though the application isn't actually "open".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My macros end with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XLDoc.SaveAs NewFileName&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XLApp.Quit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2013 05:41:18 GMT</pubDate>
    <dc:creator>gerhardl</dc:creator>
    <dc:date>2013-03-19T05:41:18Z</dc:date>
    <item>
      <title>Excel not quitting properly from macro</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453219#M1153895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do certain excel reports via QlikView macros. They create the reports and then quit excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still have instances of EXCEL.EXE*32 showing up in my task manager's processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These reports run automatically every morning, so every few days I find myself opening TM and ending up to 5 or 10 instances of excel, even though the application isn't actually "open".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My macros end with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XLDoc.SaveAs NewFileName&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XLApp.Quit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 05:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453219#M1153895</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-03-19T05:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Excel not quitting properly from macro</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453220#M1153896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not really QlikView related so I went searching for excel/vbscript questions on google and found these two posts that might help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one seems to be due to the fact that the workbook is not closed before killing the excel application&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://www.vbforums.com/showthread.php?680397-RESOLVED-Excel.exe-not-closing-after-setting-objects-nothing-and-x.Quit" title="http://www.vbforums.com/showthread.php?680397-RESOLVED-Excel.exe-not-closing-after-setting-objects-nothing-and-x.Quit"&gt;http://www.vbforums.com/showthread.php?680397-RESOLVED-Excel.exe-not-closing-after-setting-objects-nothing-and-x.Quit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one has some general advice on cleaning up before killing excel that might help. There's also a workaround in the form of a piece of vbscript that will kill any Excel processes when ran&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/93958cdb-1a4d-490b-9e47-5be25e430a21/" title="http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/93958cdb-1a4d-490b-9e47-5be25e430a21/"&gt;http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/93958cdb-1a4d-490b-9e47-5be25e430a21/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 05:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453220#M1153896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-19T05:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Excel not quitting properly from macro</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453221#M1153897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johannes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've now tried different variations of closing the file and doing s cleanup after, and still no luck. Same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XLDoc.SaveAs NewFileName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XLDoc.Close &lt;SPAN style="color: #00ff00;"&gt;'test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XLApp.Quit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET XLApp = nothing &lt;SPAN style="color: #00ff00;"&gt;'test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET XLDoc = nothing &lt;SPAN style="color: #00ff00;"&gt;'test&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 06:17:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453221#M1153897</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-03-19T06:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Excel not quitting properly from macro</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453222#M1153898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I found my (stupid) problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had two different places in the code where I was repeating this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;SET &lt;/SPAN&gt;XLApp = &lt;SPAN style="color: #0000ff;"&gt;CreateObject&lt;/SPAN&gt;("Excel.Application")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then I was just quitting one instance of excel. Deleting the duplicate line sorted this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 06:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453222#M1153898</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-03-19T06:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel not quitting properly from macro</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453223#M1153899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strFile = "F:\B-FS102\GSM\Facturen\Facturatie\" &amp;amp; strValueToDisplay &amp;amp; "_" &amp;amp; strvID &amp;amp;".xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Save and quit&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; objExcelWorkbook.SaveAs strFile&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objExcelWorkbook.Close &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objExcelApp.close&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objExcelApp.quit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET objExcelWorkbook = NOTHING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET objExcelApp = NOTHING&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leaves excel open.&lt;/P&gt;&lt;P&gt;The file close but excel remains open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help anyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 12:08:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-not-quitting-properly-from-macro/m-p/453223#M1153899</guid>
      <dc:creator>dirk1955</dc:creator>
      <dc:date>2015-05-29T12:08:41Z</dc:date>
    </item>
  </channel>
</rss>

