<?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 Re: VB Script to Select a Month and Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348469#M129087</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've put the equals sign in and it still doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cannot open file '='C:\My Documents\Data\( '&amp;amp;MinString')&amp;nbsp; The filename, directory name, or volume label syntax is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I'm doing something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2012 09:34:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-13T09:34:18Z</dc:date>
    <item>
      <title>VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348464#M129082</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 was wondering if it was possible to produce some VB Script which would enable me to have a dropdown box where I can select the month and year:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Month:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;P&gt;Feb&lt;/P&gt;&lt;P&gt;Mar&lt;/P&gt;&lt;P&gt;Apr&lt;/P&gt;&lt;P&gt;Jun&lt;/P&gt;&lt;P&gt;Jul&lt;/P&gt;&lt;P&gt;Aug&lt;/P&gt;&lt;P&gt;Sep&lt;/P&gt;&lt;P&gt;Oct&lt;/P&gt;&lt;P&gt;Nov&lt;/P&gt;&lt;P&gt;Dec&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Year:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2010&lt;/P&gt;&lt;P&gt;2011&lt;/P&gt;&lt;P&gt;2012&lt;/P&gt;&lt;P&gt;2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once, I've made these selections - I want this to become a variable value vFilePath = "C:\My Documents\Data (&lt;STRONG&gt;Month Year&lt;/STRONG&gt;)" which I can put in my loading script. i.e. if I choose Jul and 2012, then vFilePath becomes C:\My Documents\Data (Jul 2012)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 16:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348464#M129082</guid>
      <dc:creator />
      <dc:date>2012-07-12T16:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348465#M129083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need a macro for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do it this way instead:&lt;/P&gt;&lt;P&gt;1) Have this in the script:&lt;/P&gt;&lt;P&gt;Dates:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Date(AddMonths(MakeDate(2010,1),recno()-1),'MMM YYYY') as YearMonth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; autogenerate 48;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Display this field in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Create an inputbox with one variable: "vFilePath"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Set "Input box properties -&amp;gt; Constraints -&amp;gt; Settings for selected variable -&amp;gt; Value" to &lt;/P&gt;&lt;P&gt;='C:\My Documents\Data (' &amp;amp; MinString(YearMonth) &amp;amp; ')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can select your month in a list box and getyour variable that you can use in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 22:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348465#M129083</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-07-12T22:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348466#M129084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me.&amp;nbsp; This doesn't work when I reference vFilePath in the load script (i.e. $(vFilePath)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script, it comes up with an error and shows vFilePath as 'C:\My Documents\Data (' &amp;amp; MinString(YearMonth) &amp;amp; ')' instead of the actual path using the list box when selecting the month/year.&amp;nbsp; Is there anyway this can be copied as text into the variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 08:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348466#M129084</guid>
      <dc:creator />
      <dc:date>2012-07-13T08:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348467#M129085</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;Make sure that you include the = sign as first character in the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 08:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348467#M129085</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-07-13T08:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348468#M129086</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;Henric is correct...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a variable and in the definition section write ='C:\My Documents\Data (' &amp;amp; MinString(YearMonth) &amp;amp; ')' , you have to do it through Variables Overview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 08:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348468#M129086</guid>
      <dc:creator />
      <dc:date>2012-07-13T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348469#M129087</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've put the equals sign in and it still doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cannot open file '='C:\My Documents\Data\( '&amp;amp;MinString')&amp;nbsp; The filename, directory name, or volume label syntax is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I'm doing something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 09:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348469#M129087</guid>
      <dc:creator />
      <dc:date>2012-07-13T09:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348470#M129088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right. I have tested it and for some reason it does not do what I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, there is another way to do this without macros.Check the attached file. In it I have an input box where the variable values are constrained to the only possible years/months. When you run the script, these variables can be used to define fields or file paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 11:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348470#M129088</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-07-13T11:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: VB Script to Select a Month and Year</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348471#M129089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Henric!! That works now! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 11:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Script-to-Select-a-Month-and-Year/m-p/348471#M129089</guid>
      <dc:creator />
      <dc:date>2012-07-13T11:47:32Z</dc:date>
    </item>
  </channel>
</rss>

