<?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 RemoveDuplicates VB code stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/92740#M42456</link>
    <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I have found a few places in the many forums available where there is some mention of using this VB code in a code stage to remove duplicate lines within an Excel file.&amp;nbsp;&amp;nbsp;This code below works perfectly fine when I only pass it one column to check, but I cannot figure out how to pass multiple columns to be checked.&lt;BR /&gt;&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;STRONG&gt;1&lt;/STRONG&gt;, Header:=1) works great.&lt;BR /&gt;&lt;BR /&gt;I have tried using the following code using curly brackets which I had read was how you should represent an array, but I get the error "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"&lt;BR /&gt;&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;STRONG&gt;{1,2}&lt;/STRONG&gt;, Header:=1)&lt;BR /&gt;&lt;BR /&gt;The following gives me an error of Exception from HRESULT: 0x800A03EC&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:="&lt;STRONG&gt;1,2"&lt;/STRONG&gt;, Header:=1)&lt;BR /&gt;&lt;BR /&gt;I know there are other ways to go this via macros, spying Excel etc, but I am trying to build up my own Excel VBO to supplement what is currently missing from the existing one.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any experience with how to fix this?&amp;nbsp; Any help or thoughts would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Derek Turner&lt;BR /&gt;Applications Advisor&lt;BR /&gt;Celestica&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 25 Sep 2019 15:00:00 GMT</pubDate>
    <dc:creator>Derek.Turner</dc:creator>
    <dc:date>2019-09-25T15:00:00Z</dc:date>
    <item>
      <title>RemoveDuplicates VB code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/92740#M42456</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I have found a few places in the many forums available where there is some mention of using this VB code in a code stage to remove duplicate lines within an Excel file.&amp;nbsp;&amp;nbsp;This code below works perfectly fine when I only pass it one column to check, but I cannot figure out how to pass multiple columns to be checked.&lt;BR /&gt;&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;STRONG&gt;1&lt;/STRONG&gt;, Header:=1) works great.&lt;BR /&gt;&lt;BR /&gt;I have tried using the following code using curly brackets which I had read was how you should represent an array, but I get the error "Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"&lt;BR /&gt;&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;STRONG&gt;{1,2}&lt;/STRONG&gt;, Header:=1)&lt;BR /&gt;&lt;BR /&gt;The following gives me an error of Exception from HRESULT: 0x800A03EC&lt;BR /&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:="&lt;STRONG&gt;1,2"&lt;/STRONG&gt;, Header:=1)&lt;BR /&gt;&lt;BR /&gt;I know there are other ways to go this via macros, spying Excel etc, but I am trying to build up my own Excel VBO to supplement what is currently missing from the existing one.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any experience with how to fix this?&amp;nbsp; Any help or thoughts would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Derek Turner&lt;BR /&gt;Applications Advisor&lt;BR /&gt;Celestica&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Sep 2019 15:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/92740#M42456</guid>
      <dc:creator>Derek.Turner</dc:creator>
      <dc:date>2019-09-25T15:00:00Z</dc:date>
    </item>
  </channel>
</rss>

