<?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 VBA Code to close a Qlikview Document. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197353#M57055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vlad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot it's working fine now. &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Nov 2010 06:23:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-27T06:23:29Z</dc:date>
    <item>
      <title>Excel VBA Code to close a Qlikview Document.</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197351#M57053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a below macro in excel which opens a qlikview document "Reloads" the data in it and saves it but I am unable to close the same using the vba code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub RefreshQlikviewfile ()&lt;BR /&gt;Dim Fname As String&lt;/P&gt;&lt;P&gt;Fname = ThisWorkbook.Sheets(3).Cells(2, 2).Value&lt;/P&gt;&lt;P&gt;Set QvDoc = GetObject(Fname)&lt;BR /&gt;QvDoc.Reload&lt;BR /&gt;QvDoc.Save&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;I tried to use the below code lines but any of them didn't work.&lt;/P&gt;&lt;P&gt;1) QvDoc.Quit&lt;/P&gt;&lt;P&gt;2) QvDoc.Exit&lt;/P&gt;&lt;P&gt;3) QvDoc.Close&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help in advance.[:)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 16:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197351#M57053</guid>
      <dc:creator />
      <dc:date>2010-11-22T16:43:10Z</dc:date>
    </item>
    <item>
      <title>Excel VBA Code to close a Qlikview Document.</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197352#M57054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;set Qv = CreateObject("QlikTech.QlikView")&lt;BR /&gt;set QvDoc = Qv.OpenDocEx (Fname,0)&lt;BR /&gt;QvDoc.Reload&lt;BR /&gt;QvDoc.Save&lt;BR /&gt;QvDoc.CloseDoc&lt;BR /&gt;Qv.Quit&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If that doesn't work, then there's some restriction with Excel that I'm not aware of. In which case, you would probably need to kill the QV.exe process after the save:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Set objWMIService = GetObject("winmgmts:" _&lt;BR /&gt; &amp;amp; "{impersonationLevel=impersonate}!\\" _&lt;BR /&gt; &amp;amp; ".\root\cimv2")&lt;BR /&gt;Set colProcess = objWMIService.ExecQuery _&lt;BR /&gt; ("Select * from Win32_Process Where Name = 'Qv.exe'")&lt;BR /&gt;For Each objProcess in colProcess&lt;BR /&gt; objProcess.Terminate()&lt;BR /&gt;Next&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 19:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197352#M57054</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-11-22T19:01:57Z</dc:date>
    </item>
    <item>
      <title>Excel VBA Code to close a Qlikview Document.</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197353#M57055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vlad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot it's working fine now. &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Nov 2010 06:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197353#M57055</guid>
      <dc:creator />
      <dc:date>2010-11-27T06:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Excel VBA Code to close a Qlikview Document.</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197354#M57056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a Ton..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 10:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-VBA-Code-to-close-a-Qlikview-Document/m-p/197354#M57056</guid>
      <dc:creator />
      <dc:date>2013-06-11T10:34:36Z</dc:date>
    </item>
  </channel>
</rss>

