<?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 VBscript macro not working with ActiveDocument in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VBscript-macro-not-working-with-ActiveDocument/m-p/531394#M198562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I am facing a problem in calling VBScript macro from my script whenever that macro access any OCX interface. If i do not use OCX then it works fine.&lt;/P&gt;&lt;P&gt;For example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function abc(c)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc = c&lt;/P&gt;&lt;P&gt;end Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine and when I call&lt;/P&gt;&lt;P&gt;let v = abc (12)&lt;/P&gt;&lt;P&gt;then the value of v is 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if my macro looks like&lt;/P&gt;&lt;P&gt;function abc(c)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc = c&lt;/P&gt;&lt;P&gt;ActiveDocument.GetSheetObject("CH07").Minimize&lt;/P&gt;&lt;P&gt;end Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I call&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let v = abc(c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the the value of v is null and the sheet object CH07 is not minimized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am i missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Macro security level is "safe Mode" and current local security is "only safe mode"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Oct 2013 17:25:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-27T17:25:21Z</dc:date>
    <item>
      <title>VBscript macro not working with ActiveDocument</title>
      <link>https://community.qlik.com/t5/QlikView/VBscript-macro-not-working-with-ActiveDocument/m-p/531394#M198562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I am facing a problem in calling VBScript macro from my script whenever that macro access any OCX interface. If i do not use OCX then it works fine.&lt;/P&gt;&lt;P&gt;For example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function abc(c)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc = c&lt;/P&gt;&lt;P&gt;end Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine and when I call&lt;/P&gt;&lt;P&gt;let v = abc (12)&lt;/P&gt;&lt;P&gt;then the value of v is 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if my macro looks like&lt;/P&gt;&lt;P&gt;function abc(c)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abc = c&lt;/P&gt;&lt;P&gt;ActiveDocument.GetSheetObject("CH07").Minimize&lt;/P&gt;&lt;P&gt;end Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I call&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let v = abc(c)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the the value of v is null and the sheet object CH07 is not minimized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am i missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Macro security level is "safe Mode" and current local security is "only safe mode"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 17:25:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBscript-macro-not-working-with-ActiveDocument/m-p/531394#M198562</guid>
      <dc:creator />
      <dc:date>2013-10-27T17:25:21Z</dc:date>
    </item>
  </channel>
</rss>

