<?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 runs but doesn't create file for regular users in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-runs-but-doesn-t-create-file-for-regular-users/m-p/874367#M305394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro which exports a chart to a csv file, then displays a completion text box to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our users are running the macro via Access Point using the IE Plugin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro works fine and creates the file for 2 users (QV developers) but not for anyone else. The macro runs for them and displays the completion text box, but no file is created. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have confirmed that they have set macro security to provide system access. Is there some particular permission required, or log file that might shed light on the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is as follows.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;sub ExportUpdates&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'create timestamp based name - specific to the second &lt;/P&gt;
&lt;P&gt;&amp;nbsp; sUserName = Replace(ActiveDocument.GetLayout.AuthenticatedUser, "\", "_")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileNameTS = CStr(year(now())) &amp;amp; right("0" &amp;amp; CStr(month(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Day(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Hour(now())), 2) &lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileNameTS = sFileNameTS &amp;amp; right("0" &amp;amp; CStr(Minute(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Second(now())), 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileName = "\\sydinfil02\Common\Administration\Monthly Sales\QV\Clinician_" &amp;amp; sFileNameTS &amp;amp; "." &amp;amp; sUserName &amp;amp; ".csv"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileName1= "\\sydinfil02\Common\Administration\Monthly Sales\QV\Clinic_" &amp;amp; sFileNameTS &amp;amp; "." &amp;amp; sUserName &amp;amp; ".csv"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; BudgetFileExtracted=false&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set sExportTable1 = ActiveDocument.GetSheetObject( "CH70" ) ' the main chart per clinician&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Only export if there are rows to modify&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If sExportTable1.GetRowCount &amp;gt; 1 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sExportTable1.Export sFileName,"|"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sMessage = "Your updates were submitted."&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set sExportTable1 = ActiveDocument.GetSheetObject( "CH68" ) ' the chart per clinic&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Only export if there are rows to modify&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If sExportTable1.GetRowCount &amp;gt; 1 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sExportTable1.Export sFileName1,"|"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sMessage = "Your updates were submitted."&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Set variables to display text box&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("strFilename")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; v.SetContent sMessage,true&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("bDisplayFilename")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; v.SetContent "1",true&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2015 04:13:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-15T04:13:43Z</dc:date>
    <item>
      <title>Macro runs but doesn't create file for regular users</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-runs-but-doesn-t-create-file-for-regular-users/m-p/874367#M305394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro which exports a chart to a csv file, then displays a completion text box to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our users are running the macro via Access Point using the IE Plugin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro works fine and creates the file for 2 users (QV developers) but not for anyone else. The macro runs for them and displays the completion text box, but no file is created. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have confirmed that they have set macro security to provide system access. Is there some particular permission required, or log file that might shed light on the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is as follows.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;sub ExportUpdates&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'create timestamp based name - specific to the second &lt;/P&gt;
&lt;P&gt;&amp;nbsp; sUserName = Replace(ActiveDocument.GetLayout.AuthenticatedUser, "\", "_")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileNameTS = CStr(year(now())) &amp;amp; right("0" &amp;amp; CStr(month(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Day(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Hour(now())), 2) &lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileNameTS = sFileNameTS &amp;amp; right("0" &amp;amp; CStr(Minute(now())), 2) &amp;amp; right("0" &amp;amp; CStr(Second(now())), 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileName = "\\sydinfil02\Common\Administration\Monthly Sales\QV\Clinician_" &amp;amp; sFileNameTS &amp;amp; "." &amp;amp; sUserName &amp;amp; ".csv"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sFileName1= "\\sydinfil02\Common\Administration\Monthly Sales\QV\Clinic_" &amp;amp; sFileNameTS &amp;amp; "." &amp;amp; sUserName &amp;amp; ".csv"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; BudgetFileExtracted=false&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set sExportTable1 = ActiveDocument.GetSheetObject( "CH70" ) ' the main chart per clinician&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Only export if there are rows to modify&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If sExportTable1.GetRowCount &amp;gt; 1 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sExportTable1.Export sFileName,"|"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sMessage = "Your updates were submitted."&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set sExportTable1 = ActiveDocument.GetSheetObject( "CH68" ) ' the chart per clinic&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Only export if there are rows to modify&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If sExportTable1.GetRowCount &amp;gt; 1 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sExportTable1.Export sFileName1,"|"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sMessage = "Your updates were submitted."&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Set variables to display text box&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("strFilename")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; v.SetContent sMessage,true&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("bDisplayFilename")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; v.SetContent "1",true&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 04:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-runs-but-doesn-t-create-file-for-regular-users/m-p/874367#M305394</guid>
      <dc:creator />
      <dc:date>2015-07-15T04:13:43Z</dc:date>
    </item>
  </channel>
</rss>

