<?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 Execute a Macro inside load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201103#M59353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tks Gordon for your reply.&lt;/P&gt;&lt;P&gt;I created a function and into load script I execute it by CALL command.&lt;/P&gt;&lt;P&gt;Call MonthDiff()&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Sep 2010 10:34:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-15T10:34:58Z</dc:date>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201101#M59351</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;is possible execute an Qlikview macro inside a load script?&lt;/P&gt;&lt;P&gt;Tks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201101#M59351</guid>
      <dc:creator />
      <dc:date>2010-09-14T17:06:17Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201102#M59352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure! Just create it and then use it in the macro - Qlikview will look for it at load time if it cannot find a native function. For example I created this function which I use in a script:&lt;/P&gt;&lt;P&gt;Function MonthDiff (startdate, enddate)&lt;BR /&gt;' return number of months between two dates&lt;BR /&gt; If IsDate(startdate) and IsDate(enddate) Then&lt;BR /&gt; MonthDiff = DateDiff("m", startdate, enddate)&lt;BR /&gt; End If&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201102#M59352</guid>
      <dc:creator />
      <dc:date>2010-09-14T17:57:49Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201103#M59353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tks Gordon for your reply.&lt;/P&gt;&lt;P&gt;I created a function and into load script I execute it by CALL command.&lt;/P&gt;&lt;P&gt;Call MonthDiff()&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 10:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201103#M59353</guid>
      <dc:creator />
      <dc:date>2010-09-15T10:34:58Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201104#M59354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I tried this very same code and get "Script line error" in Call MonthDiff()&lt;/P&gt;&lt;P&gt;what could it be, has the syntax changed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 17:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201104#M59354</guid>
      <dc:creator />
      <dc:date>2011-02-09T17:06:26Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201105#M59355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;If you are calling the function from the load string, do as follows instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET vExecFunction = MonthDiff();&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If the function in the macro editor (CTRL + M) is built using Sub / End Sub instead of Function / End Function, then use CALL in the script.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 17:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201105#M59355</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-02-09T17:16:47Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201106#M59356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use the code as in my example then it is a function not a sub - you call a sub but not a function. So, to use my code you would simply have in the script:&lt;/P&gt;&lt;P&gt;MonthDiff(date1, date2)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 17:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201106#M59356</guid>
      <dc:creator />
      <dc:date>2011-02-09T17:24:47Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201107#M59357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Gordon, I'm just trying the same as you. Loading a macro inside the loading script.&lt;/P&gt;&lt;P&gt;I have many problems doing that.&lt;/P&gt;&lt;P&gt;When I write in my loading script :&lt;/P&gt;&lt;P style="font-weight: bold"&gt;call myFunction()&lt;/P&gt;&lt;P&gt;I got an error message.&lt;/P&gt;&lt;P&gt;My suggestions is :&lt;/P&gt;&lt;P&gt;1- You can only call the macros in VBScript ( I have my macros in jscript).&lt;/P&gt;&lt;P&gt;2-I've tried both ways to get the same result (functions in javascript and vbscript), and I still can't get it work.&lt;/P&gt;&lt;P&gt;Any Ideas about what I'm doing wrong??&lt;/P&gt;&lt;P&gt;Many thanks in advance!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 18:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201107#M59357</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2011-02-09T18:40:50Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201108#M59358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont undertstand what the problem is - I use the function (VBS) in several documents and they work just fine in v9sr4 and previously in v8.2.&lt;/P&gt;&lt;P&gt;Is your problem just the dates you are passing to the function being invalid or the wrong format?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 18:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201108#M59358</guid>
      <dc:creator />
      <dc:date>2011-02-09T18:54:32Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201109#M59359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, in fact I'm not using your dates function. Actually, I have a document with "jscript" macros. And I would like to execute a macro (that generates xml files) before reloading the document with the new day information.&lt;/P&gt;&lt;P&gt;I know that a useful solution would be separate the execution in two files. First execute the document that contains the macro, and then reload the document with the information generated in the previous document.&lt;/P&gt;&lt;P&gt;But I still want to do it in the same doucment, I think it would be cooler ;).&lt;/P&gt;&lt;P&gt;Hope you can give me some advices about that.&lt;/P&gt;&lt;P&gt;Many thanks in advance!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 10:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201109#M59359</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2011-02-10T10:04:49Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201110#M59360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about using the document OnOpen event to execute the macro? You would need to be able to identify from within the macro when the action should be fired as it will fire every time (including user access) which you can do by passing a variable and value through the command line interface using the /v switch.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 10:47:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201110#M59360</guid>
      <dc:creator />
      <dc:date>2011-02-10T10:47:15Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201111#M59361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestion.&lt;/P&gt;&lt;P&gt;Finally I've decided to create a .bat file which calls the QV document, adding a flag variable that tells the document to generate the xml files, reload the document, save it and finally close it.&lt;/P&gt;&lt;P&gt;Now works easily. Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 12:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201111#M59361</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2011-02-10T12:35:53Z</dc:date>
    </item>
    <item>
      <title>Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201112#M59362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Gordon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Hope u r fine,I used the code as placed in&amp;nbsp; your example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function MonthDiff (startdate, enddate)&lt;/P&gt;&lt;P&gt;' return number of months between two dates&lt;/P&gt;&lt;P&gt;If IsDate(startdate) and IsDate(enddate) Then&lt;/P&gt;&lt;P&gt;MonthDiff = DateDiff("m", startdate, enddate)&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; and try to invoke it in my script as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vExecFunction = MonthDiff(Date(AddMonths(Today(),-4)),Today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and debug the script, I find vExecFunction variable holding null value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please let me know why it so.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 13:12:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201112#M59362</guid>
      <dc:creator />
      <dc:date>2012-02-22T13:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201113#M59363</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;I have tried several things to make this work but it is not working. I have a funktion that should automatically send a mail.&lt;/P&gt;&lt;P&gt;I call my function in the load script like this.&lt;/P&gt;&lt;P&gt;let mail = sendMailTest();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works fine if I open qv and press the load script button, but when I load the qvw in the management console it doesnt work can anyone explain me the reason why??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 13:40:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201113#M59363</guid>
      <dc:creator />
      <dc:date>2013-04-04T13:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201114#M59364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive probably testing the same function. From the loading script a macro should be started and mail incl a pdf should be sent. I dont know why this is such a pain.. &lt;/P&gt;&lt;P&gt;I heard sth about the OnPostReload Triggers. Maybe somehow it will work through triggers.&lt;/P&gt;&lt;P&gt;Unfortunately I dont find this "OnPost" trigger.&lt;/P&gt;&lt;P&gt;On execution trigger doesnt work in my case...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers chesterluck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 14:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201114#M59364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-11T14:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201115#M59365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="j-act-avatar"&gt;&lt;A _jive_internal="true" class="j-avatar jiveTT-hover-user" data-avatarid="1025" data-externalid="" data-online="false" data-presence="null" data-userid="133627" data-username="sriniranga1974" href="https://community.qlik.com/people/sriniranga1974" title="Srinivasan Rangaswamy"&gt;Srinivasan Rangaswamy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am having a code which execute at the script and display the message at the vb Script (Both are haveing issue at the call code any Tought process/Guidence)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt;1. I am loading at the script and&lt;/P&gt;&lt;P&gt;2 showing the completed time at the vbscript message box.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;here is my peace of code.Can any one of you help me out on this.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;QV Script&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET vStart = num(now());&lt;/P&gt;&lt;P&gt;Store * from&amp;nbsp; FactTemp into FactTemp.qvd (qvd) ;&lt;/P&gt;&lt;P&gt;LET vRunTime = interval(now() - $(vStart),'mm:ss');&lt;/P&gt;&lt;P&gt;call alp(vRunTime) ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VB Macro&lt;/P&gt;&lt;P&gt;function alp(vRunTime)&lt;/P&gt;&lt;P&gt;msgbox vRunTime;&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;or&lt;BR /&gt;&amp;nbsp;&amp;nbsp; consider this example&lt;/P&gt;&lt;P&gt;QV script&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;call alp(20)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vb script&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function alp(vRunTime)&lt;/P&gt;&lt;P&gt;msgbox vRunTime&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 04:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201115#M59365</guid>
      <dc:creator />
      <dc:date>2013-08-26T04:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201116#M59366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.qlik.com/qlik-users/2084"&gt;Gordon Savage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only reason why your example isn't working within my test application is because my Qlikview isn't recognizing &lt;EM&gt;&lt;STRONG&gt;DateDiff&lt;/STRONG&gt;&lt;/EM&gt; as a valid function. Despite that, your logic makes complete sense. In order to use the Macro Function in the Load Script, you call it like the following in the Load Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14272257150265792 jive_macro_code" jivemacro_uid="_14272257150265792"&gt;
&lt;P&gt;Let vMonths = MonthDiff( Today(), Today() - 600)&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I researched other sources and confirmed that you cannot utilize Macro Functions within Expressions on the front-end of Qlikview. In other words, I cannot utilize MonthDiff() in a Text Box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post contains an alternative function which worked in my application; it utilizes the same method, but a different macro function, which is why I believe the only reason MonthDiff() doesn't work is because of DateDiff() (&lt;A href="https://luciancotea.wordpress.com/2013/07/04/call-vba-macro-function-from-the-load-script/" title="https://luciancotea.wordpress.com/2013/07/04/call-vba-macro-function-from-the-load-script/"&gt;Call VBA macro function from the load script | Lucian Cotea&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14272259278106876" jivemacro_uid="_14272259278106876"&gt;
&lt;P&gt;//Create this function in the Module&lt;/P&gt;
&lt;P&gt;function Inc(Value)&lt;/P&gt;
&lt;P&gt;Inc = Value+1&lt;/P&gt;
&lt;P&gt;end function&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Use in Load Script&lt;/P&gt;
&lt;P&gt;LET _VAR1 = Inc(1);&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last thing, there is no need to create a trigger for this macro in the document settings because it is a function. If it were a Sub, we'd need to create a trigger as mentioned previously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 19:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/201116#M59366</guid>
      <dc:creator />
      <dc:date>2015-03-24T19:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a Macro inside load script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/1522637#M437648</link>
      <description>&lt;P&gt;Hi, Can I piggyback onto this query.&lt;/P&gt;&lt;P&gt;I've created a function that works okay (see attached screenshots), but was hoping to have it execute whilst the script loads. Have I done it properly?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-a-Macro-inside-load-script/m-p/1522637#M437648</guid>
      <dc:creator>cmccafferty</dc:creator>
      <dc:date>2018-12-19T15:35:04Z</dc:date>
    </item>
  </channel>
</rss>

