<?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 Error in calling function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986402#M956715</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'm just learning how to create SUB and FUNCTION in Qlikview.&amp;nbsp; I have a function called CreateExcel() which accepts an ObjectID.&lt;/P&gt;&lt;P&gt;If I do a Test within the Edit Module, it creates the Excel with the object id I passed in.&amp;nbsp; However if I place this call in the Load Script like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call CreateExcel("TB01");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error: call CreateExcel("TB01")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I used this syntax in load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vRetVal = &lt;SPAN style="font-size: 13.3333px;"&gt;CreateExcel("TB01");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't get the error but no Excel generated either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the right syntax to call this in load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 16:31:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-12T16:31:22Z</dc:date>
    <item>
      <title>Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986402#M956715</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'm just learning how to create SUB and FUNCTION in Qlikview.&amp;nbsp; I have a function called CreateExcel() which accepts an ObjectID.&lt;/P&gt;&lt;P&gt;If I do a Test within the Edit Module, it creates the Excel with the object id I passed in.&amp;nbsp; However if I place this call in the Load Script like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call CreateExcel("TB01");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error: call CreateExcel("TB01")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I used this syntax in load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vRetVal = &lt;SPAN style="font-size: 13.3333px;"&gt;CreateExcel("TB01");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't get the error but no Excel generated either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the right syntax to call this in load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 16:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986402#M956715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T16:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986403#M956716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can access the chart objects from within the script execution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 17:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986403#M956716</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-12T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986404#M956717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the option I recommend,&lt;/P&gt;&lt;P&gt;add a trigger, after charging, running the macro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105311_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/105312_pastedImage_2.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986404#M956717</guid>
      <dc:creator>jer_2011</dc:creator>
      <dc:date>2015-11-12T18:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986405#M956718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thank you.&amp;nbsp; This makes sense now that I'm thinking about it as the document objects haven't loaded yet.&lt;/P&gt;&lt;P&gt;I think I was just anxious to test out the macro.&amp;nbsp;&amp;nbsp; I am assuming you can create a button to invoke the function?&amp;nbsp; How do you pass in the parameter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986405#M956718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T18:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986406#M956719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-style: inherit; font-size: 11.7px;"&gt;&lt;A href="https://community.qlik.com/people/jer_2011"&gt;jer_2011&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, your suggestion worked !!.&amp;nbsp; Now how do I pass in the Object ID to the function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986406#M956719</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T18:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986407#M956720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so either. For example, if you run this script under QVB control, there are no UI objects at all. They only get created when QVS loads the document in memory and tries to visualise whatever you created on your sheets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986407#M956720</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-11-12T18:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986408#M956721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="hps"&gt;example &lt;/SPAN&gt;&lt;SPAN class="hps"&gt;Object ID&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Excel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Macro1()&lt;BR /&gt; &lt;BR /&gt; Set objExcel = CreateObject("Excel.Application")&lt;BR /&gt; objExcel.Workbooks.Open("c:\Excel.xls")&amp;nbsp; ' file name excel&lt;BR /&gt; objExcel.Visible = True&lt;BR /&gt; &lt;BR /&gt; objExcel.Sheets("&lt;SPAN class="hps"&gt;sheet&lt;/SPAN&gt;1").activate&lt;BR /&gt; &lt;BR /&gt; ActiveDocument.GetSheetObject("TX03"). CopyBitmapToClipboard&amp;nbsp; ' Objet ID&lt;/P&gt;&lt;P&gt; objExcel.Sheets("&lt;SPAN class="hps"&gt;sheet&lt;/SPAN&gt;1").cells(2,2).select&lt;BR /&gt; objExcel.Sheets("&lt;SPAN class="hps"&gt;sheet&lt;/SPAN&gt;1").paste &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.GetSheetObject("CH05"). CopyBitmapToClipboard&amp;nbsp; ' Objet ID&lt;/P&gt;&lt;P&gt;objExcel.Sheets("&lt;SPAN class="hps"&gt;sheet&lt;/SPAN&gt;1").cells(2,4).select&lt;/P&gt;&lt;P&gt; objExcel.Sheets("&lt;SPAN class="hps"&gt;sheet&lt;/SPAN&gt;1").paste &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 19:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986408#M956721</guid>
      <dc:creator>jer_2011</dc:creator>
      <dc:date>2015-11-12T19:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986409#M956722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I know how to code the function to accept a parameter.&amp;nbsp; But how do I call it using the trigger example you provided in above?&amp;nbsp; When I entered in the Macro Name like CreateExcel("TB01") to include the object id, it did not work.&amp;nbsp; Maybe my syntax isn't correct?&amp;nbsp; Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 19:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986409#M956722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T19:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986410#M956723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;to work with the example that happens, just add the name of the macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105313_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 20:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986410#M956723</guid>
      <dc:creator>jer_2011</dc:creator>
      <dc:date>2015-11-12T20:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986411#M956724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But you're hard coding the object id - like TX03, CH05 in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find out how to pass in dynamically.&amp;nbsp; Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 20:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986411#M956724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-12T20:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986412#M956725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, you want to &lt;A href="https://community.qlik.com/message/720704"&gt;Re: Passing parameters to Macro's when called by button&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 21:42:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986412#M956725</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-12T21:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986413#M956726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H6 style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 11.7px;"&gt;&lt;A href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;&lt;/STRONG&gt;&lt;/H6&gt;&lt;P&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 11.7px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 11.7px;"&gt;I checked out the link you provided but I have no success yet.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 11.7px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 11.7px;"&gt;I am still searching and trying different things&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986413#M956726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-13T20:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error in calling function</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986414#M956727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And which of the two approaches that Rob suggested is not working yet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use a variable, it will look like (assuming that you created a variable in variable overview vMacroParameter and set the object ID):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB MacroCall&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.GetVariable("vMacroParameter")&lt;/P&gt;&lt;P&gt;msgbox("Parameter Output " &amp;amp; v.GetContent.String)&lt;/P&gt;&lt;P&gt;END SUB &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be warned that there are a lot of limitations using macros in QV, especially when working with the Ajax client. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 10:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-calling-function/m-p/986414#M956727</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-14T10:41:37Z</dc:date>
    </item>
  </channel>
</rss>

