<?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 Macro help! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-help/m-p/234466#M85884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don`t think you are evaluating the variable in the right way&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;sub PlaySound&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vMacroUser")&lt;BR /&gt;if v.GetContent.String = "David"&lt;/P&gt;&lt;P&gt;ActiveDocument ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for testing purposes you can include a msgbox in the middle for tests: msgbox(v.GetContent.String)&lt;/P&gt;&lt;P&gt;or even msgbox(ActiveDocument.Variables("vMacroUser").GetContent.String)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Apr 2011 23:07:35 GMT</pubDate>
    <dc:creator>erichshiino</dc:creator>
    <dc:date>2011-04-28T23:07:35Z</dc:date>
    <item>
      <title>Macro help!</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-help/m-p/234465#M85883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Could anyone explain me why the macro below always plays ding.wav when vMacroUser = David ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub PlaySound&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vMacroUser = "David" Then&lt;/P&gt;&lt;P&gt;ActiveDocument.PlaySound "C:\WINDOWS\Media\tada.wav"&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;ActiveDocument.PlaySound "C:\WINDOWS\Media\ding.wav"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 22:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-help/m-p/234465#M85883</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2011-04-28T22:58:19Z</dc:date>
    </item>
    <item>
      <title>Macro help!</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-help/m-p/234466#M85884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don`t think you are evaluating the variable in the right way&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;sub PlaySound&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vMacroUser")&lt;BR /&gt;if v.GetContent.String = "David"&lt;/P&gt;&lt;P&gt;ActiveDocument ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for testing purposes you can include a msgbox in the middle for tests: msgbox(v.GetContent.String)&lt;/P&gt;&lt;P&gt;or even msgbox(ActiveDocument.Variables("vMacroUser").GetContent.String)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 23:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-help/m-p/234466#M85884</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-28T23:07:35Z</dc:date>
    </item>
  </channel>
</rss>

