<?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: Deleting multiple objects using a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Deleting-multiple-objects-using-a-macro/m-p/1356518#M616550</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;FYI - I've realised what the problem was...&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;The macro was stopping where an initial sheet object no longer exists.&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;Adding 'On Error Resume Next' before the line '&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;s.SheetObjects(object).Close' solves this&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;SPAN class="emoticon-inline emoticon_happy" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2017 08:41:09 GMT</pubDate>
    <dc:creator>scottwadeson</dc:creator>
    <dc:date>2017-05-30T08:41:09Z</dc:date>
    <item>
      <title>Deleting multiple objects using a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Deleting-multiple-objects-using-a-macro/m-p/1356517#M616549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a macro that deletes a list of Qlikview objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already have a variable, called &lt;EM&gt;vOriginalObjects2&lt;/EM&gt;, which creates a list of objects to be deleted, but the below macro only seems to delete a large chunk of them. I feel like the error is at the point where i'm saying 'for each object' and this isn't actually looking at all the objects in the list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable &lt;EM style="font-size: 13.3333px;"&gt;vOriginalObjects2&lt;/EM&gt; contains a long list of objects such as:&lt;/P&gt;&lt;P&gt;Document\AnalysisBar,Document\AnalysisBubble,Document\DashTrellis3,Document\DashTrellis4,Document\TX29,Document\TX30...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the macro is:&lt;/P&gt;&lt;P&gt;Sub DeleteOriginalObjects&amp;nbsp; &lt;/P&gt;&lt;P&gt;set s=ActiveDocument.Sheets("Main")&lt;/P&gt;&lt;P&gt;vArray = ActiveDocument.GetVariable("vOrigObjects2").GetContent.String&amp;nbsp; &lt;/P&gt;&lt;P&gt;chartArray =split(vArray, ",")&amp;nbsp; &lt;/P&gt;&lt;P&gt;For each object in chartArray&amp;nbsp; &lt;/P&gt;&lt;P&gt;s.SheetObjects(object).Close&amp;nbsp; &lt;/P&gt;&lt;P&gt;Next&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;End Sub&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know where I am going wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide a bit of context, the reason I am doing this is so I can easily find out which objects have been added to a qlikview document since the initial version. I have the list of objects from the initial version (&lt;EM style="font-size: 13.3333px;"&gt;vOriginalObjects2)&lt;/EM&gt; and the plan is to delete all of these using the macro, then press ctrl+shift+s to see what is left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 20:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Deleting-multiple-objects-using-a-macro/m-p/1356517#M616549</guid>
      <dc:creator>scottwadeson</dc:creator>
      <dc:date>2017-05-29T20:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting multiple objects using a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Deleting-multiple-objects-using-a-macro/m-p/1356518#M616550</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;FYI - I've realised what the problem was...&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;The macro was stopping where an initial sheet object no longer exists.&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;Adding 'On Error Resume Next' before the line '&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;s.SheetObjects(object).Close' solves this&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;SPAN class="emoticon-inline emoticon_happy" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 08:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Deleting-multiple-objects-using-a-macro/m-p/1356518#M616550</guid>
      <dc:creator>scottwadeson</dc:creator>
      <dc:date>2017-05-30T08:41:09Z</dc:date>
    </item>
  </channel>
</rss>

