<?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: Convert Excel macro to Blue Prism code stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49419#M4830</link>
    <description>Hi John / Mitsuko&lt;BR /&gt;&lt;BR /&gt;Thanks for the speedy response.&lt;BR /&gt;Yeah, understood. I got the basic idea. I wrote a VBA module to do some web scraping and data extraction from a secure web Portal.&lt;BR /&gt;This required importing libraries do do this. In .Net I have similar code. This requires different but similar libraries.&lt;BR /&gt;However when trying to break this down and write code stages, Blue Prism throws errors on these libraries and reports that these are not recognized objects. The error is thrown on the 'webBrowser' object in this case.&lt;BR /&gt;&lt;BR /&gt;I'm guessing it's more likely a syntax issue&lt;BR /&gt;I had to import an HTML library for the Excel module to work which I don't see in the .Net, but as you say the code is very similar otherwise.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Gavin&lt;BR /&gt;Example:
&lt;PRE class="line-numbers  language-clike"&gt;&lt;CODE&gt;Imports System.IO
Imports System.Net

Public Class Form1

    Dim WithEvents myWebBrowser As New WebBrowser
    Dim WithEvents myWebBrowser2 As New WebBrowser​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gavin Rudling&lt;BR /&gt;Digital Consultant &amp;amp; Developer&lt;BR /&gt;Cog3nt&lt;BR /&gt;Africa/Johannesburg&lt;BR /&gt;0813906789&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 29 Sep 2021 14:52:00 GMT</pubDate>
    <dc:creator>GAVIN.RUDLING</dc:creator>
    <dc:date>2021-09-29T14:52:00Z</dc:date>
    <item>
      <title>Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49416#M4827</link>
      <description>Good day team.&lt;BR /&gt;I'm wondering if it is possible to take code from an Excel macro and convert it within a code stage within Blue Prism. If possible, I would like to learn how to go about this.&lt;BR /&gt;&lt;BR /&gt;Kind Regards&lt;BR /&gt;Gavin&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gavin Rudling&lt;BR /&gt;Digital Consultant &amp;amp; Developer&lt;BR /&gt;Cog3nt&lt;BR /&gt;Africa/Johannesburg&lt;BR /&gt;0813906789&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Sep 2021 06:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49416#M4827</guid>
      <dc:creator>GAVIN.RUDLING</dc:creator>
      <dc:date>2021-09-28T06:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49417#M4828</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In other words, you want to "convert VBA to VB.NET" ?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa192490(v=office.11)" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2003/aa192490(v=office.11)&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Mitsuko &lt;BR /&gt;Asia/Tokyo&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49417#M4828</guid>
      <dc:creator>sumire</dc:creator>
      <dc:date>2021-09-28T09:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49418#M4829</link>
      <description>Hi Gavin as Mitsuko points out, it's essentially a case of rewriting the VBA macro code as equivalent .Net code. VBA and VB.Net are similar but not the same, so unfortunately it's not just a case of cut&amp;amp;paste.&lt;BR /&gt;&lt;BR /&gt;A good way to start is to record your macro and study the resulting VBA code. The take a look at code stages in the Excel VBO and compare the two. And if you record a macro that does a similar action to one of the VBO pages, eg read from a cell, activate a sheet etc, then you'll be able to make a direct comparison.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2021 11:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49418#M4829</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2021-09-29T11:12:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49419#M4830</link>
      <description>Hi John / Mitsuko&lt;BR /&gt;&lt;BR /&gt;Thanks for the speedy response.&lt;BR /&gt;Yeah, understood. I got the basic idea. I wrote a VBA module to do some web scraping and data extraction from a secure web Portal.&lt;BR /&gt;This required importing libraries do do this. In .Net I have similar code. This requires different but similar libraries.&lt;BR /&gt;However when trying to break this down and write code stages, Blue Prism throws errors on these libraries and reports that these are not recognized objects. The error is thrown on the 'webBrowser' object in this case.&lt;BR /&gt;&lt;BR /&gt;I'm guessing it's more likely a syntax issue&lt;BR /&gt;I had to import an HTML library for the Excel module to work which I don't see in the .Net, but as you say the code is very similar otherwise.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Gavin&lt;BR /&gt;Example:
&lt;PRE class="line-numbers  language-clike"&gt;&lt;CODE&gt;Imports System.IO
Imports System.Net

Public Class Form1

    Dim WithEvents myWebBrowser As New WebBrowser
    Dim WithEvents myWebBrowser2 As New WebBrowser​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gavin Rudling&lt;BR /&gt;Digital Consultant &amp;amp; Developer&lt;BR /&gt;Cog3nt&lt;BR /&gt;Africa/Johannesburg&lt;BR /&gt;0813906789&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2021 14:52:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49419#M4830</guid>
      <dc:creator>GAVIN.RUDLING</dc:creator>
      <dc:date>2021-09-29T14:52:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49420#M4831</link>
      <description>Hi Gavin - it's not quite as easy as that. Instead of writing an &lt;CODE&gt;Imports &lt;/CODE&gt;statement in the code, you need to make an entry in the Code Options of the VBO. Go to the Initialise page and double click the 'nameplate' element to open the object properties. In there select the Code Options tab and see that there is a section for references and a section for imports. Take a look in the Utility - JSON object to get the idea:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25762.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/25894i72C26CF47AA0B3CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="25762.png" alt="25762.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Note also that there is a Global Code section where you can classes and functions etc.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Sep 2021 09:05:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49420#M4831</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2021-09-30T09:05:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49421#M4832</link>
      <description>Thanks John&lt;BR /&gt;&lt;BR /&gt;That is one of the reasons for this query.&lt;BR /&gt;I have added the namespace Imports, as I thought, but my lack of knowledge / experience with this functionality of Blue Prism, seems to be catching up with this old brain.&lt;BR /&gt;This is a copy out of Visual Studio, where the code seems to be working.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25763.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/25895iDE4A2A8297293345/image-size/large?v=v2&amp;amp;px=999" role="button" title="25763.png" alt="25763.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25764.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/25897iA876891FB0F0FA5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="25764.png" alt="25764.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gavin Rudling&lt;BR /&gt;Digital Consultant &amp;amp; Developer&lt;BR /&gt;Cog3nt&lt;BR /&gt;Africa/Johannesburg&lt;BR /&gt;0813906789&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Sep 2021 09:25:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49421#M4832</guid>
      <dc:creator>GAVIN.RUDLING</dc:creator>
      <dc:date>2021-09-30T09:25:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49422#M4833</link>
      <description>Hi you first need to have your library referenced in the upper section, then you can add a namespace import, or alternatively use a fully qualified class name in your code. Not sure which library you want but there is WebBrowser class in System.Windows.Forms&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25766.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/25896iFF7525CF68EFA3CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="25766.png" alt="25766.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;John Carter&lt;BR /&gt;Professional Services&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Sep 2021 15:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49422#M4833</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2021-09-30T15:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Convert Excel macro to Blue Prism code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49423#M4834</link>
      <description>Thanks John, I think I found the correct Dll file "System.Windows.Forms.dll".&lt;BR /&gt;At least I can move on to the next step.&lt;BR /&gt;Much appreciated.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Gavin&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gavin Rudling&lt;BR /&gt;Digital Consultant &amp;amp; Developer&lt;BR /&gt;Cog3nt&lt;BR /&gt;Africa/Johannesburg&lt;BR /&gt;0813906789&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Oct 2021 06:05:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Convert-Excel-macro-to-Blue-Prism-code-stage/m-p/49423#M4834</guid>
      <dc:creator>GAVIN.RUDLING</dc:creator>
      <dc:date>2021-10-01T06:05:00Z</dc:date>
    </item>
  </channel>
</rss>

