<?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: close macro problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368727#M137055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First time i am having only one application i.e; "CreateQVWFile.qvw"&lt;/P&gt;&lt;P&gt;In the above qvw file having a button action that contains action like to create new qvw file &amp;amp; save&amp;nbsp; and reload the given qvd.&lt;/P&gt;&lt;P&gt;After clicking the button it create new qvw file "First.qvw".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that why we are creating new QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2012 12:29:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-26T12:29:42Z</dc:date>
    <item>
      <title>close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368723#M137051</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;&lt;/P&gt;&lt;P&gt;Sub NewQVWFile&lt;/P&gt;&lt;P&gt;set NewTest = ActiveDocument.GetApplication&lt;/P&gt;&lt;P&gt;NewTest.CreateDoc.SaveAs("C:\Users\admin\Desktop\NewApp's\first.qvw")&lt;/P&gt;&lt;P&gt;NewTest.CloseDoc //error generating here&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried above macro code for creating new QVW file and save and then close the first.qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above macro is creating new qvw file and saving the file as first.qvw upto here it is working fine &lt;/P&gt;&lt;P&gt;but while coming closing the first.qvw file creating problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can anyone help in this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 11:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368723#M137051</guid>
      <dc:creator />
      <dc:date>2012-03-26T11:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368724#M137052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the attached file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only you need to do is change the path of this&amp;nbsp; test application in macro&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 11:59:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368724#M137052</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-03-26T11:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368725#M137053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sunil, thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried below macro its working fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you cross check below macro and suggest me whether we are having any other better approach to acheive like this.&lt;/P&gt;&lt;P&gt;[Note : please check performance perspective also]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub NewQVWFile&lt;/P&gt;&lt;P&gt;set NewFile = ActiveDocument.GetApplication&lt;/P&gt;&lt;P&gt;NewFile.CreateDoc.SaveAs("C:\Users\admin\Desktop\NewApp's\first.qvw")&lt;/P&gt;&lt;P&gt;set app = NewFile.OpenDoc("C:\Users\admin\Desktop\NewApp's\first.qvw","","")&lt;/P&gt;&lt;P&gt;rem ** add new line to script **&lt;/P&gt;&lt;P&gt;set docprop = app.GetProperties&lt;/P&gt;&lt;P&gt;docprop.Script = docprop.Script &amp;amp; "LOAD * FROM [..\InputFields\RTQMain.qvd](qvd);"&lt;/P&gt;&lt;P&gt;app.SetProperties docprop&lt;/P&gt;&lt;P&gt;app.Reload&lt;/P&gt;&lt;P&gt;app.save&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368725#M137053</guid>
      <dc:creator />
      <dc:date>2012-03-26T12:07:11Z</dc:date>
    </item>
    <item>
      <title>close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368726#M137054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sub NewQVWFile&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;set NewFile = ActiveDocument.GetApplication&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;NewFile.CreateDoc.SaveAs("C:\Users\admin\Desktop\NewApp's\first.qvw")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;set app = NewFile.OpenDoc("C:\Users\admin\Desktop\NewApp's\first.qvw","","")&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;rem ** add new line to script **&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;set docprop = app.GetProperties&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;docprop.Script = docprop.Script &amp;amp; "LOAD * FROM [..\InputFields\RTQMain.qvd](qvd);"&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;app.SetProperties docprop&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;app.Reload&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;app.save&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i thing there is no need of&amp;nbsp; line in bold &lt;/P&gt;&lt;P&gt;else its working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368726#M137054</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-03-26T12:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368727#M137055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First time i am having only one application i.e; "CreateQVWFile.qvw"&lt;/P&gt;&lt;P&gt;In the above qvw file having a button action that contains action like to create new qvw file &amp;amp; save&amp;nbsp; and reload the given qvd.&lt;/P&gt;&lt;P&gt;After clicking the button it create new qvw file "First.qvw".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that why we are creating new QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 12:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368727#M137055</guid>
      <dc:creator />
      <dc:date>2012-03-26T12:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: close macro problem</title>
      <link>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368728#M137056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried below macro code for adding new script line into existed tab "Main 2" , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the below code works like creating another new tab "Main 2" and adding the script line as $(Include=d:\vqd eat\text\test.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what to change in below code for add new script line into existed tab "Main 2" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;docprop.Script = docprop.Script &amp;amp; chr(13) &amp;amp; chr(10) &amp;amp; "///$tab Main 2" &amp;amp; chr(13) &amp;amp; chr(10) &amp;amp; "$(Include=d:\vqd eat\text\test.txt);" &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 16:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/close-macro-problem/m-p/368728#M137056</guid>
      <dc:creator />
      <dc:date>2012-03-27T16:16:16Z</dc:date>
    </item>
  </channel>
</rss>

