<?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 Re: Macro Question - Module Opening Post Reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334253#M123244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole problem becomes much more manageable if you write the vbs code outside the qvw. That is, run it in a vbs file using cscript. The only thing you have to add is the: &lt;/P&gt;&lt;P&gt;CreateObject("QlikTech.QlikView")&lt;/P&gt;&lt;P&gt;OpenDoc or OpenDocEx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2012 15:39:36 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2012-08-06T15:39:36Z</dc:date>
    <item>
      <title>Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334247#M123238</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;We have recently moved from Qlikview 8.5 to 11, however, we have an issue with macro's opening post reload that we haven't been able to solve yet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro's run to export a number of tables to Excel, and they're set by identifiying the object id and the file path for the Excel location.&amp;nbsp; The macro's have run without issue for a number of years on QV 8.5, and we haven't amended them in any way since moving to QV11.&amp;nbsp; However, now, once the report has reloaded the first call command of the sub routine runs and exports the table to Excel as we would expect, but then the module opens up, but with no error messages to indicate an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does any one have know what could be the cause? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 11:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334247#M123238</guid>
      <dc:creator />
      <dc:date>2012-08-02T11:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334248#M123239</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;could you please paste the macro code so that we can see what the possible issue might be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another thing is qv11 does not support the OnPostReload macro to export when you are scheduling through QEMC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also check what module security is defined for the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Kuldeep Tak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 07:41:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334248#M123239</guid>
      <dc:creator />
      <dc:date>2012-08-03T07:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334249#M123240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're scheduling it through QEMC it won't run. You need to schedule it via Windows Task Manager (take it off the QEMC scheduler) and run a bat file that does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cd C:\Program Files (x86)\QlikView&lt;/P&gt;&lt;P&gt;qv.exe /l C:\QVW Documents\Demo.qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this will KEEP an instance of qv.exe open on the server. So within the Macro, right as it finishes, you need to put the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will close the qv.exe when OnPostReload has finished running and your tables have been exported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also go to "Settings -&amp;gt; User Preferences -&amp;gt; Security" and tick everything except "Confirm Launch from Macro"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press Ctrl-M to get to your Macro code, and make sure "System Access" and "Allow System Access" drop down boxes are selected at the left hand side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's *EVERYTHING* you need to get this up and running again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 08:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334249#M123240</guid>
      <dc:creator />
      <dc:date>2012-08-03T08:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334250#M123241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Further to biggin above, the problem continues as I have performed all the same and still encounter the macro opening up on end sub.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a very simple macro to&amp;nbsp; read&lt;/P&gt;&lt;P&gt;Sub RunMe()&lt;/P&gt;&lt;P&gt;Call exportToExcel("ABC","&lt;A href="https://community.qlik.com/"&gt;\\Tscnas02\MIS&lt;/A&gt; Data Warehouse\Automated report\aTEST.xls")&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;sub exportToExcel(objectId, filePath)&lt;BR /&gt;dim o&lt;BR /&gt;Set o = ActiveDocument.GetSheetObject(objectId)&lt;BR /&gt;o.ExportBiff filePath&lt;BR /&gt;Set o = nothing&lt;/P&gt;&lt;P&gt;f_name = filePath&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oXL=CreateObject("Excel.Application")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oWB=oXL.Workbooks.Open(f_name)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oSH=oWB.Worksheets.Item(1)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;oWB.Save&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;oWB.Close&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oSH=nothing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oWB=nothing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oXL=nothing&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this is simple stuff and I would expect that to be the end.&amp;nbsp; However, the module opens in a script editor box after exporting the file.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Really frustrating - is there a server setting issue I have missed here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 12:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334250#M123241</guid>
      <dc:creator />
      <dc:date>2012-08-06T12:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334251#M123242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*quick answer* &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;ActiveDocument.GetApplication.Quit&lt;/SPAN&gt; at the end of your Sub (right before End Sub)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you read my post above you'll see what to do to close the module after OnPostReload has fired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently went through the exact same exercise (except I exported images of the charts) and following what I've outlined above, you'll be able to schedule OnPostReload macro's to fire through WINDOWS Task Scheduler without any issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 13:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334251#M123242</guid>
      <dc:creator />
      <dc:date>2012-08-06T13:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334252#M123243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you - What you suggest does help close the application at the end, but not the problem that both Biggin and myself have expressed.&amp;nbsp; The Qlikview Macro scripting window opens each time and on further examination, creates an error where it cannot create an Actix X object bla blah!!&amp;nbsp; This I found frustrating as it works fine in teh 8.5 ver we still have and want to migrate away from&lt;/P&gt;&lt;P&gt;Good news though is that one I removed the old code that references shortcuts it works fine:&lt;/P&gt;&lt;P&gt;REMOVED from code above&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;f_name = filePath&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oXL=CreateObject("Excel.Application")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oWB=oXL.Workbooks.Open(f_name)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oSH=oWB.Worksheets.Item(1)&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;oWB.Save&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;oWB.Close&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oSH=nothing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oWB=nothing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set oXL=nothing&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;Thanks for all your help though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 15:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334252#M123243</guid>
      <dc:creator />
      <dc:date>2012-08-06T15:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334253#M123244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole problem becomes much more manageable if you write the vbs code outside the qvw. That is, run it in a vbs file using cscript. The only thing you have to add is the: &lt;/P&gt;&lt;P&gt;CreateObject("QlikTech.QlikView")&lt;/P&gt;&lt;P&gt;OpenDoc or OpenDocEx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 15:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334253#M123244</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-08-06T15:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334254#M123245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Certainly worth the try.&lt;/P&gt;&lt;P&gt;Many thanks to all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 16:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334254#M123245</guid>
      <dc:creator />
      <dc:date>2012-08-06T16:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Question - Module Opening Post Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334255#M123246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually tried what Rob suggested but it didn't work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason why your Macro window opens (and is kept open) is because of the ActiveXObject error. That is entirely different to the OP's issue IMO. You might need to check if Excel is still installed on your server. However, I've had issue with ActiveXObject and it would appear QV10+ doesn't support much except the basic Windows-based ones&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 06:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Question-Module-Opening-Post-Reload/m-p/334255#M123246</guid>
      <dc:creator />
      <dc:date>2012-08-07T06:48:58Z</dc:date>
    </item>
  </channel>
</rss>

