<?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 Problem to run macro with a button in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320921#M584053</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;I am using a macro to select a date range. i have created a button to run the macro but whenever i press the button, it opens up the macro editor window...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the macro is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;sub DataBetweenSelectedDate 'Used with the Variables , it filter the reports for two selected dates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;set FD = ActiveDocument.Variables("From date") '' variable for Initial date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;FrmDtt=(FD.GetContent.String)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;FrmDate="&amp;gt;=" &amp;amp; month(FrmDtt) &amp;amp; "/" &amp;amp; Day(FrmDtt) &amp;amp; "/" &amp;amp; year(FrmDtt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; set TD = ActiveDocument.Variables("To date")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ToDtt=(TD.GetContent.String)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; ToDate="&amp;lt;=" &amp;amp; month(ToDtt) &amp;amp; "/" &amp;amp; Day(ToDtt) &amp;amp; "/" &amp;amp; year(ToDtt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; if FrmDtt&amp;gt;ToDtt then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;msgbox "Start Date Should be less than End Date"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ActiveDocument.Fields("T_DAY_DATE").Select FrmDate&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp; ToDate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help to resolve this issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sushil &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2011 10:30:16 GMT</pubDate>
    <dc:creator>sushil353</dc:creator>
    <dc:date>2011-10-07T10:30:16Z</dc:date>
    <item>
      <title>Problem to run macro with a button</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320921#M584053</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;I am using a macro to select a date range. i have created a button to run the macro but whenever i press the button, it opens up the macro editor window...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the macro is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;sub DataBetweenSelectedDate 'Used with the Variables , it filter the reports for two selected dates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;set FD = ActiveDocument.Variables("From date") '' variable for Initial date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;FrmDtt=(FD.GetContent.String)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;FrmDate="&amp;gt;=" &amp;amp; month(FrmDtt) &amp;amp; "/" &amp;amp; Day(FrmDtt) &amp;amp; "/" &amp;amp; year(FrmDtt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; set TD = ActiveDocument.Variables("To date")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ToDtt=(TD.GetContent.String)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; ToDate="&amp;lt;=" &amp;amp; month(ToDtt) &amp;amp; "/" &amp;amp; Day(ToDtt) &amp;amp; "/" &amp;amp; year(ToDtt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt; if FrmDtt&amp;gt;ToDtt then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;msgbox "Start Date Should be less than End Date"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ActiveDocument.Fields("T_DAY_DATE").Select FrmDate&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp; ToDate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help to resolve this issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sushil &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 10:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320921#M584053</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2011-10-07T10:30:16Z</dc:date>
    </item>
    <item>
      <title>Problem to run macro with a button</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320922#M584054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; When it opens the macro editor, does it highlight a specific line?&lt;/P&gt;&lt;P&gt;Can you post your qvw for examination?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 13:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320922#M584054</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2011-10-07T13:35:14Z</dc:date>
    </item>
    <item>
      <title>Problem to run macro with a button</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320923#M584055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can msgbox at different lines to find which line the error is triggered. I think something is wrong with else part of your code. Check adding msgbox right after else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 17:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-run-macro-with-a-button/m-p/320923#M584055</guid>
      <dc:creator />
      <dc:date>2011-10-07T17:34:48Z</dc:date>
    </item>
  </channel>
</rss>

