<?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 Calling VBScript in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955949#M328528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm having a little difficulty with this topic and I can't find out too much information about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I would like to add a subroutine/function to the loading script that deletes several sheets (this is because I need to maintain several similar versions of the same application, and the sheets are not required in one version).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the following subroutine, which works fine in the Edit Module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB RemoveSheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.RemoveSheetByID "TEST"&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I cannot figure out how exactly to call it from the script.&amp;nbsp; I tried creating it as a function, but this did not work either - I just keep getting a Script line error.&amp;nbsp; My call in the script is CALL FUNCTION(fRemSts());&amp;nbsp; Have attached the latest version I had in the Edit Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'm missing something really simple, but if anyone could provide some assistance with this I'd be very grateful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Sep 2015 14:34:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-15T14:34:04Z</dc:date>
    <item>
      <title>Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955949#M328528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm having a little difficulty with this topic and I can't find out too much information about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, I would like to add a subroutine/function to the loading script that deletes several sheets (this is because I need to maintain several similar versions of the same application, and the sheets are not required in one version).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the following subroutine, which works fine in the Edit Module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB RemoveSheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.RemoveSheetByID "TEST"&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I cannot figure out how exactly to call it from the script.&amp;nbsp; I tried creating it as a function, but this did not work either - I just keep getting a Script line error.&amp;nbsp; My call in the script is CALL FUNCTION(fRemSts());&amp;nbsp; Have attached the latest version I had in the Edit Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'm missing something really simple, but if anyone could provide some assistance with this I'd be very grateful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 14:34:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955949#M328528</guid>
      <dc:creator />
      <dc:date>2015-09-15T14:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955950#M328529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you couldn't call a sub-routine only the way per function worked - but only code worked which didn't need an &lt;STRONG&gt;ActiveDocument&lt;/STRONG&gt; which only exists after the reload is finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 14:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955950#M328529</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-15T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955951#M328530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus, I guess that would explain the fact that when I'm in the Edit Module, and I run the subroutine using the Test button, it works exactly as desired (and also using a button that references the macro).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is it not possible then to refer to ActiveDocument properties during the load script then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What also works is to call the subroutine on Open Document - but ideally I would delete all the sheets, and have the advantage of a smaller file size, before the user interacts with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 14:51:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955951#M328530</guid>
      <dc:creator />
      <dc:date>2015-09-15T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955952#M328531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I now see this has already been covered, apologies:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/87150"&gt;Calling VB script macro from load script&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, in order to automate the deletion of sheets, I could map the subroutine to a button within the application, and then set another document to press this button (via a separate .vbs file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems a bit cumbersome though - are there are any better alternatives, does anyone know?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 15:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955952#M328531</guid>
      <dc:creator />
      <dc:date>2015-09-15T15:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955953#M328532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you want to remove the sheets from the applications? I have often hidden sheets - per conditions on osuser() - which contains specialized export &amp;amp; print objects, administrative things like the structur-table and temp-sheets for testing this and that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 16:22:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955953#M328532</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-15T16:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955954#M328533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to remove the sheets because one version of the document only has one sheet displayed to the end user.&amp;nbsp; However, it is very slow to load (and is also being loaded by another document, using WebPageViewer (&lt;A href="http://www.qlikblog.at/2679/improved-webpageviewer-qlikview-extension/" title="http://www.qlikblog.at/2679/improved-webpageviewer-qlikview-extension/"&gt;Improved WebPageViewer QlikView Extension (WebPageViewer2)&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no point having all these sheets in the stripped down version, and since there are about 15 of them, with numerous graphs and tables, I am trying to do as much as I can to reduce the overall file size.&amp;nbsp; But I have to maintain the applications together because they share a lot of variables etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob Wunderlich's Document Analyzer helped a lot, but it would be great to reduce things still further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 16:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955954#M328533</guid>
      <dc:creator />
      <dc:date>2015-09-15T16:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VBScript in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955955#M328534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are right. Maybe things would be easier if you don't put the sheet-removing routines within the application else using macro-scripts from outside (another qvw or external vbs-file) which might loop through a filelist of qvw and do this and that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 19:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-in-Script/m-p/955955#M328534</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-15T19:23:12Z</dc:date>
    </item>
  </channel>
</rss>

