<?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 Sleep Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193138#M54530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written the following Macro:&lt;/P&gt;&lt;P&gt;Sub Cycle()&lt;BR /&gt;set APP = ActiveDocument.GetApplication&lt;BR /&gt;For i=0 TO 3&lt;BR /&gt;if ActiveDocument.ActiveSheet.GetProperties.SheetID="Document\SH34" then&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Ashain Singh"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("B")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Byron Cowley"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("C")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Dave van Vuuren"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("D")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Ingrid Dyson"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("E1")&lt;BR /&gt;Else&lt;BR /&gt;if ActiveDocument.ActiveSheet.GetProperties.SheetID="Document\SH35" then&lt;BR /&gt;ActiveDocument.GetSheetByID("SH34").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").SelectAll&lt;BR /&gt;ActiveDocument.GetSheetByID("SH34").Activate&lt;BR /&gt;APP.Sleep 10000&lt;BR /&gt;'msgbox("Hello2")&lt;BR /&gt;End if&lt;BR /&gt;End if&lt;BR /&gt;next&lt;BR /&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;&lt;/P&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;&lt;P&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;the problem being that it does not return an error and it runs for the duration. If we un-comment the msgbox's the macro runs and we can follow every step, but a human action is required, we are looking for this thing to run by itself once the button is clicked.&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Sep 2010 13:39:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-08T13:39:58Z</dc:date>
    <item>
      <title>Sleep Function</title>
      <link>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193138#M54530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written the following Macro:&lt;/P&gt;&lt;P&gt;Sub Cycle()&lt;BR /&gt;set APP = ActiveDocument.GetApplication&lt;BR /&gt;For i=0 TO 3&lt;BR /&gt;if ActiveDocument.ActiveSheet.GetProperties.SheetID="Document\SH34" then&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Ashain Singh"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("B")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Byron Cowley"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("C")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Dave van Vuuren"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("D")&lt;BR /&gt;APP.Refresh&lt;BR /&gt;ActiveDocument.GetSheetByID("SH35").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").Select "Ingrid Dyson"&lt;BR /&gt;APP.Sleep 5000&lt;BR /&gt;'msgbox("E1")&lt;BR /&gt;Else&lt;BR /&gt;if ActiveDocument.ActiveSheet.GetProperties.SheetID="Document\SH35" then&lt;BR /&gt;ActiveDocument.GetSheetByID("SH34").Activate&lt;BR /&gt;ActiveDocument.Fields("Team Leader").SelectAll&lt;BR /&gt;ActiveDocument.GetSheetByID("SH34").Activate&lt;BR /&gt;APP.Sleep 10000&lt;BR /&gt;'msgbox("Hello2")&lt;BR /&gt;End if&lt;BR /&gt;End if&lt;BR /&gt;next&lt;BR /&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;&lt;/P&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;&lt;P&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;the problem being that it does not return an error and it runs for the duration. If we un-comment the msgbox's the macro runs and we can follow every step, but a human action is required, we are looking for this thing to run by itself once the button is clicked.&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 13:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193138#M54530</guid>
      <dc:creator />
      <dc:date>2010-09-08T13:39:58Z</dc:date>
    </item>
    <item>
      <title>Sleep Function</title>
      <link>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193139#M54531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Try function WaitForIdle rather than sleep.&lt;/P&gt;&lt;P&gt;hth,&lt;BR /&gt;Thilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 16:12:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193139#M54531</guid>
      <dc:creator />
      <dc:date>2010-09-08T16:12:25Z</dc:date>
    </item>
    <item>
      <title>Sleep Function</title>
      <link>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193140#M54532</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;Thanks it helped solved the problem except that it ran too fast, so i added Sleep to the makro anyway and it seems to be working now, just that some of the objects on the sheet dont seem to refresh fast enough.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 09:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sleep-Function/m-p/193140#M54532</guid>
      <dc:creator />
      <dc:date>2010-09-09T09:28:04Z</dc:date>
    </item>
  </channel>
</rss>

