<?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: VB Macro issues in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417977#M155458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, still cant get it to work.&amp;nbsp; Not an expert with VBScript, I just know my way around a little.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 14:28:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-02T14:28:06Z</dc:date>
    <item>
      <title>VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417972#M155453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Staring at this for a long time now, what is wrong with it?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is supposed to find a record in the specified excel file based on a field currently selected in QV, and then delete the entire row in the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Excel_DeleteRow&lt;BR /&gt;MatchKey = (ActiveDocument.Variables("vMatchKey").GetContent.string)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oXL=CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f_name="c:\attend.xls"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oWB=oXL.Workbooks.Open(f_name)&lt;BR /&gt;Set oSH=oWB.Worksheets(1).Cells&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;oSH.Find(MatchKey, , , , 1, 2).EntireRow.Delete&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oWB.Save&lt;BR /&gt;oWB.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oSH=nothing&lt;BR /&gt;Set oWB=nothing&lt;BR /&gt;Set oXL=nothing&lt;BR /&gt;END SUB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 18:27:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417972#M155453</guid>
      <dc:creator />
      <dc:date>2013-05-01T18:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417973#M155454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im sorry, below is the correct code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sub Excel_DeleteRow&lt;BR /&gt;MatchKey = (ActiveDocument.Variables("vMatchKey").GetContent.string)&lt;BR /&gt;&lt;BR /&gt;Set oXL=CreateObject("Excel.Application")&lt;BR /&gt;&lt;BR /&gt;f_name="C:\attend.xls"&lt;BR /&gt;&lt;BR /&gt;Set oWB=oXL.Workbooks.Open(f_name)&lt;BR /&gt;Set oSH=oWB.Worksheets.Item(1)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;oSH.Cells.Find(MatchKey, , , , 1, 2).EntireRow.Delete&lt;BR /&gt;&lt;BR /&gt;oWB.Save&lt;BR /&gt;oWB.Close&lt;BR /&gt;&lt;BR /&gt;Set oSH=nothing&lt;BR /&gt;Set oWB=nothing&lt;BR /&gt;Set oXL=nothing&lt;BR /&gt;END SUB &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 18:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417973#M155454</guid>
      <dc:creator />
      <dc:date>2013-05-01T18:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417974#M155455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this approach is helpful: loop through rows (is vba)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = ws2.Cells.SpecialCells(xlCellTypeLastCell).Row To 1 Step -1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For ii = 1 To UBound(arr_K())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Wo = ws2.Rows(i).Find(what:=arr_K(ii), LookIn:=xlValues, lookat:=xlWhole)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not Wo Is Nothing Then ws2.Rows(i).Delete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/P&gt;&lt;P&gt;Next&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, 02 May 2013 11:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417974#M155455</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2013-05-02T11:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417975#M155456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I 'Check', itis saying:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expected ')'&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN id="mce_marker"&gt;&lt;SPAN id="mce_marker"&gt;&lt;SPAN id="mce_marker"&gt;:=arr_K(ii), LookIn:=xlValues, lookat:=xlWhole)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;﻿&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Any Idea why?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 12:31:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417975#M155456</guid>
      <dc:creator />
      <dc:date>2013-05-02T12:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417976#M155457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't applied these code 1:1 - it is vba, not vbscript. I meant the approach with loop through rows. Possibly vbscript supported not the function "find" then you could use autofilter.&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, 02 May 2013 12:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417976#M155457</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2013-05-02T12:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417977#M155458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, still cant get it to work.&amp;nbsp; Not an expert with VBScript, I just know my way around a little.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 14:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417977#M155458</guid>
      <dc:creator />
      <dc:date>2013-05-02T14:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: VB Macro issues</title>
      <link>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417978#M155459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Often it is easier to do such things directly in vba with open- or change-trigger. There is a lot of examples per google. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it could be better to solved in QV themselves - load this excel-file, filter the data and store/export the result.&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, 03 May 2013 09:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VB-Macro-issues/m-p/417978#M155459</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2013-05-03T09:12:48Z</dc:date>
    </item>
  </channel>
</rss>

