<?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: Macro: Password protection for xlsx file and setting a reload condition in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114837#M754307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i guess my attachement is not what you are looking for. I did not exactly read your post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2018 13:37:59 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2018-09-27T13:37:59Z</dc:date>
    <item>
      <title>Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114832#M754302</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;By the help of our community we are able to use the below macro to export the table into xlsx format. But we are still in search for the macros that will allow to save this output file along with a '&lt;STRONG&gt;password protection'&lt;/STRONG&gt; and also a '&lt;STRONG&gt;condition'&lt;/STRONG&gt; to reload the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone please advise how can I give the password to my output file and save, also how could I set the conditions in macro so that my application will be reloaded only when this condition get's met. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Condition&lt;/STRONG&gt;:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;let vISQVReloaded_TMP =(TEXT(DATE(ReloadTime(), 'YYYYMMDD')) = TEXT(DATE(Today(), 'YYYYMMDD')));&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ISQVRELOADED:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD $(vISQVReloaded_TMP) as ISQVRELOADED_TMP&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;autogenerate(1);&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if wildmatch(ISQVRELOADED_TMP,'*-1*')=0 then&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SET TriggerError;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;else &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;errormode=0;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;*****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Existing Xlsx macro which I am using now: &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;myFile = "Account_" &amp;amp; cDate(DATE) &amp;amp; ".xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FUNCTION cDate(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strYear = YEAR(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF LEN(MONTH(myDate)) = 1 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMonth = "0" &amp;amp; MONTH(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMonth = MONTH(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF LEN(Day(myDate)) = 1 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strDay = "0" &amp;amp; Day(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strDay = Day(myDate)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cDate = strYear &amp;amp; "-" &amp;amp; strMonth &amp;amp; "-" &amp;amp; strDay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;myFile = "Account_" &amp;amp; cTime(Now) &amp;amp; ".xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FUNCTION cTime(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strHour = Hour(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF LEN(Hour(myTime))= 1 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strHour = "0" &amp;amp; Hour(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strHour = Hour(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMinute = Minute(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF LEN(Minute(myTime))= 1 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMinute = "0" &amp;amp; Minute(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMinute = Minute(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSecond = Second(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF LEN(Minute(myTime))= 1 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSecond = "0" &amp;amp; Second(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSecond = Second(myTime)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cTime = strHour &amp;amp; "-" &amp;amp; strMinute &amp;amp; "-" &amp;amp; strSecond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sub exportExel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;set obj = ActiveDocument.GetSheetObject("CH05")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;set objExcel = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;objExcel.Visible = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;objExcel.Workbooks.Add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Set ASheet = objExcel.ActiveSheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASheet.Application.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASheet.Range("A1").Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;obj.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASheet.Paste&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASheet.SaveAs "D:\Account_A1_" &amp;amp; cDate(DATE) &amp;amp; "_" &amp;amp; cTime(Now) &amp;amp; ".xlsx"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;objExcel.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found this macro for password protection and trying to incorporate this into my macro but unable to do it successfully. &lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P style="margin-top: 6.0pt; margin-bottom: 6.0pt; background: #272822;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #66d9ef;"&gt;Function&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #f8f8f2;"&gt; SaveWorkbookAsPasswordProtected&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.0pt; margin-bottom: 6.0pt; background: #272822;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #f8f8f2;"&gt; ActiveWorkbook.SaveAs Filename:="...\&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #66d9ef;"&gt;protected&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #f8f8f2;"&gt;.xlsx&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #a6e22e;"&gt;", Password:="&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #ae81ff;"&gt;1234&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #a6e22e;"&gt;", WriteResPassword:="&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #ae81ff;"&gt;1234&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #f8f8f2;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 6.0pt; margin-bottom: 6.0pt; background: #272822;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #66d9ef;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.5pt; font-family: Consolas; color: #66d9ef;"&gt;Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this.&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;Nihal &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114832#M754302</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114833#M754303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;First&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;Replace this line:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;ASheet.SaveAs "D:\Account_A1_" &amp;amp; cDate(DATE) &amp;amp; "_" &amp;amp; cTime(Now) &amp;amp; ".xlsx"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;ASheet.SaveAs "D:\Account_A1_" &amp;amp; cDate(DATE) &amp;amp; "_" &amp;amp; cTime(Now) &amp;amp; ".xlsx"&lt;/STRONG&gt;&lt;CODE style="font-style: inherit; font-weight: inherit; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN class="pun" style="font-style: inherit; font-family: inherit; color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-style: inherit; font-family: inherit; color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-style: inherit; font-family: inherit; color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-style: inherit; font-family: inherit; color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-style: inherit; font-family: inherit; color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-style: inherit; font-family: inherit; color: #303336;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="str" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #7d2727;"&gt;&lt;STRONG&gt;"1234"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN class="str" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #7d2727;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Second&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;No clue, Maybe someone else can tell you whats wrong with your conditional reload!&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN class="str" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #7d2727;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114833#M754303</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-27T13:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114834#M754304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; It did worked. Thank you very much Frank. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please advise me how to set my condition in this macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114834#M754304</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-09-27T13:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114835#M754305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry It's my bad, I have just noticed your attachment. I will check on this now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114835#M754305</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-09-27T13:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114836#M754306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sorry,No clue, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Maybe someone else can tell you whats wrong with your conditional reload!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114836#M754306</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-27T13:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114837#M754307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i guess my attachement is not what you are looking for. I did not exactly read your post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:37:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114837#M754307</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-27T13:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114838#M754308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right. I hope that someone else will guide me how to set my condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114838#M754308</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-09-27T13:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114839#M754309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You couldn't grab a table-value in this way else you will need peek() for it. Beside this it's not necessary to create the formatting-stuff within the variable else you could do the check directly within the if-statement like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;Condition&lt;/STRONG&gt;&lt;SPAN style="text-decoration: line-through;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;let vISQVReloaded_TMP =(TEXT(DATE(ReloadTime(), 'YYYYMMDD')) = TEXT(DATE(Today(), 'YYYYMMDD')));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;ISQVRELOADED:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;LOAD $(vISQVReloaded_TMP) as ISQVRELOADED_TMP&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;autogenerate(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if &lt;STRONG&gt;floor(ReloadTime()) = Today()&lt;/STRONG&gt; then&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SET TriggerError;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;else &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;errormode=0;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:11:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114839#M754309</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-09-27T14:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114840#M754310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Marcus, I was not clear on my requirement in my original post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, we were using that condition in QV and calling the variable(&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica',sans-serif; color: #3d3d3d; background: white;"&gt;vISQVReloaded_TMP&lt;/SPAN&gt;) in NPrinting task. Based on this condition, NPrinting task will create the report and save the file. If the condition doesn’t met then NPrinting task won’t create the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to the increase in file size, from last couple of days we are unable to create the report by using NPrinting task, and the reason we found is that NPrinting 16 is only in 32 bit. Therefore it can only have 4 GB of RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome the present situation, we are using this macro to save the file by just reloading the application through NPrinting reload task. Now we stuck how to set and call that same condition in this macro, so that it will work how it was before. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise if there are any conditions that will set in my scenario. Thank you for your time towards this issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 13:44:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114840#M754310</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-09-28T13:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114841#M754311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need the variable for further purposes than you could keep it, for example in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;Condition&lt;/STRONG&gt;&lt;SPAN style="text-decoration: line-through;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;let vISQVReloaded_TMP = &lt;STRONG&gt;floor(ReloadTime()) = Today()&lt;/STRONG&gt;;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;ISQVRELOADED:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;LOAD $(vISQVReloaded_TMP) as ISQVRELOADED_TMP&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;autogenerate(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if &lt;STRONG&gt;$(vISQVReloaded_TMP)&lt;/STRONG&gt; then&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SET TriggerError;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;else &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;errormode=0;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 14:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114841#M754311</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-09-28T14:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114842#M754312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can I use this variable in my &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;VBscript please, so that I can run the macro and create the excel file when this condition is successful.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I found these examples but not sure how to use it in my macro.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Set Test = Activedocument.Variables("Test")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;MsgBox Test.GetContent.String&lt;SPAN style="font-size: 10pt;"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-size: 10pt;"&gt;SUB AAA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.GetVariable("vvv")&lt;/P&gt;&lt;P&gt;v.SetContent "999",true &lt;/P&gt;&lt;P&gt;msgbox("Value Output " &amp;amp; v.GetContent.String)&lt;/P&gt;&lt;P&gt;END SUB "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 17:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114842#M754312</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-09-28T17:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114843#M754313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it with: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vISQVReloaded_TMP").GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Sep 2018 12:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114843#M754313</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-09-30T12:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114844#M754314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, it gives me an error as &lt;STRONG&gt;Object required: '[string: "0"]'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to debug this error but could not found anything yet, as of now I set this variable at the beginning of my macro and also tried setting this within the sub.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not much familiar with macros could you p&lt;SPAN style="font-size: 10pt;"&gt;lease advise where I am doing wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 13:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114844#M754314</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-10-03T13:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114845#M754315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it without the set statement or change the call slightly - this means either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v = ActiveDocument.Variables("vISQVReloaded_TMP").GetContent.String&lt;/P&gt;&lt;P&gt;msgbox v&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vISQVReloaded_TMP")&lt;/P&gt;&lt;P&gt;vv = v.GetContent.String&lt;/P&gt;&lt;P&gt;msgbox vv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 15:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114845#M754315</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-10-03T15:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114846#M754316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;set v = ActiveDocument.Variables("vISQVReloaded_TMP")&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vv = v.GetContent.String&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;If I call only first two lines then it works and I see the '&lt;SPAN style="font-size: 13.3333px;"&gt;Trigger Error' as expected. But unfortunately the output excel file still getting created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;For example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vISQVRELOADED_TMP=&amp;nbsp; "Either '0' or '-1' ";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if '$(vISQVRELOADED_TMP)'=0 then&lt;/P&gt;&lt;P&gt; SET TriggerError;&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;errormode=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN style="font-size: 13.3333px;"&gt;vISQVRELOADED_TMP = 0 then it gives the result as 'TriggerError' and the macro &lt;STRONG&gt;should not&lt;/STRONG&gt; create the excel file on the folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If &lt;SPAN style="font-size: 13.3333px;"&gt;vISQVRELOADED_TMP = -1 then it will run the macro script and this should create the excel file on the folder. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;But at this point of time after I call the variable in my macro, in both scenarios the excel file is getting created which we don't wanted. &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Any other suggestions to achieve this in macro please and thanks a lot for your time.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 11:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114846#M754316</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-10-04T11:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114847#M754317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You wrapped the variable with single-quotes which defines the content as string. This means it couldn't be compared against a number. The already above suggested way of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;let vISQVReloaded_TMP = &lt;STRONG&gt;floor(ReloadTime()) = Today()&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if &lt;STRONG&gt;$(vISQVReloaded_TMP)&lt;/STRONG&gt; then&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 12:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114847#M754317</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-10-04T12:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114848#M754318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just displaying it for example purpose only actually I am not using the single-quotes in variable. Your suggested condition is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I stop creating the excel file when this condition shows 'Trigger error'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 14:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114848#M754318</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-10-04T14:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114849#M754319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do I understand it right that you are using an OnPostReload trigger for your export-routine? Then you need to transfer your condition also within the macro like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub export&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var = true then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nothing&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;P&gt;&lt;/P&gt;&lt;P&gt;Another way might be just to break the script with a artificial script error like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var = false then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm an error statement on which the script will break ...&lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; normal loading&lt;/P&gt;&lt;P&gt;end if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 15:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114849#M754319</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-10-04T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro: Password protection for xlsx file and setting a reload condition in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114850#M754320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Marcus for your great suggestions and &lt;SPAN style="font-size: 13.3333px;"&gt;support &lt;/SPAN&gt;towards my issue.Macro is perfectly working now...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2018 07:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Password-protection-for-xlsx-file-and-setting-a-reload/m-p/114850#M754320</guid>
      <dc:creator>nihalbuddy09</dc:creator>
      <dc:date>2018-10-06T07:01:40Z</dc:date>
    </item>
  </channel>
</rss>

