<?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: Problem with passing variable from bat file to macro in qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372593#M1275987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variable should already exist. You test for vTestBatch, but you pass a variable TestBatch. If you add another v after /v it ought to work: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"C:\Program Files\QlikView\Qv.exe" /vvTestBatch=1 "C:\QlikViewData\Develop\Test Bat file.qvw"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 16:30:23 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-09-10T16:30:23Z</dc:date>
    <item>
      <title>Problem with passing variable from bat file to macro in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372591#M1275982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a problem with passing a variable from a bat file to a macro in qlikview. It functioned before but somehow it refuses to take the variable from the command line. My bat file looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\Program Files\QlikView\Qv.exe" /vTestBatch=1 "C:\QlikViewData\Develop\Test Bat file.qvw"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My macro like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;sub TestBat&lt;BR /&gt; if vTestBatch = 1 then&lt;BR /&gt; msgbox("succes")&lt;BR /&gt; else&lt;BR /&gt; msgbox("fail")&lt;BR /&gt; end if&lt;BR /&gt; &lt;BR /&gt; End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;I put a trigger on opening. I keep getting the msgbox with the message fail. Can anybody help me on this one. How does the passing of the variable exactly work? Does the variable have to be present in the document and does the bat file set it or does the bat file create it even if it doesn't exists? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;In general I would like some more info on the use of bat file and command line specifications. Is there a place where I can find this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372591#M1275982</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with passing variable from bat file to macro in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372592#M1275983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The correct form of getting a variable value is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;set var = ActiveDocument.Variables("&lt;SPAN style="color: #3d3d3d;"&gt;vTestBatch&lt;/SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: 'courier new', courier;"&gt;val = var.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;OBJECT height="0" type="application/gas-events-abn" width="0"&gt;&lt;/OBJECT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 16:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372592#M1275983</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-10T16:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with passing variable from bat file to macro in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372593#M1275987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variable should already exist. You test for vTestBatch, but you pass a variable TestBatch. If you add another v after /v it ought to work: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"C:\Program Files\QlikView\Qv.exe" /vvTestBatch=1 "C:\QlikViewData\Develop\Test Bat file.qvw"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 16:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-passing-variable-from-bat-file-to-macro-in-qlikview/m-p/372593#M1275987</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-09-10T16:30:23Z</dc:date>
    </item>
  </channel>
</rss>

