<?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: RemoveDuplicates VB code stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73863#M26468</link>
    <description>Hi Derek,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please post sample excel file and VBO here and mean while please check the below code, here Array contains column index where 1 = "Column A", 2 = "Column B" and soon.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sheet.Range(&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"A1:C100"&lt;/SPAN&gt;&lt;SPAN&gt;).RemoveDuplicates Columns:=Array(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;), Header:=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Naga&lt;BR /&gt;Associate&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 26 Sep 2019 12:55:00 GMT</pubDate>
    <dc:creator>NagaM</dc:creator>
    <dc:date>2019-09-26T12:55:00Z</dc:date>
    <item>
      <title>RemoveDuplicates VB code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73862#M26467</link>
      <description>&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;/SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;SPAN&gt;, Header:=1) works great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:=&lt;/SPAN&gt;&lt;STRONG&gt;{1,2}&lt;/STRONG&gt;&lt;SPAN&gt;, Header:=1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following gives me an error of Exception from HRESULT: 0x800A03EC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sheet.Range("A1:E100").RemoveDuplicates(Columns:="&lt;/SPAN&gt;&lt;STRONG&gt;1,2"&lt;/STRONG&gt;&lt;SPAN&gt;, Header:=1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any experience with how to fix this?&amp;nbsp; Any help or thoughts would be greatly appreciated.&lt;/SPAN&gt;&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:37:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73862#M26467</guid>
      <dc:creator>Derek.Turner</dc:creator>
      <dc:date>2019-09-25T15:37:00Z</dc:date>
    </item>
    <item>
      <title>RE: RemoveDuplicates VB code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73863#M26468</link>
      <description>Hi Derek,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please post sample excel file and VBO here and mean while please check the below code, here Array contains column index where 1 = "Column A", 2 = "Column B" and soon.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sheet.Range(&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;"A1:C100"&lt;/SPAN&gt;&lt;SPAN&gt;).RemoveDuplicates Columns:=Array(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;), Header:=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Naga&lt;BR /&gt;Associate&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2019 12:55:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73863#M26468</guid>
      <dc:creator>NagaM</dc:creator>
      <dc:date>2019-09-26T12:55:00Z</dc:date>
    </item>
    <item>
      <title>RE: RemoveDuplicates VB code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73864#M26469</link>
      <description>Hi Naga,&lt;BR /&gt;&lt;BR /&gt;When using the &lt;EM&gt;Array(1,2)&lt;/EM&gt;, I receive a compile error of&amp;nbsp;&lt;EM&gt;'Array' is a type and cannot be used as an expression&lt;/EM&gt; which is why I was trying to use the {1,2} as the way to express the array values.&lt;BR /&gt;&lt;BR /&gt;Attached is the sample data I am using as well as the code stage text.&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>Thu, 26 Sep 2019 13:52:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/RemoveDuplicates-VB-code-stage/m-p/73864#M26469</guid>
      <dc:creator>Derek.Turner</dc:creator>
      <dc:date>2019-09-26T13:52:00Z</dc:date>
    </item>
  </channel>
</rss>

