<?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 I use this version with… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63886#M16751</link>
    <description>I use this version with invoke to open read only:

name = ExecWithTimeout(Timeout, ""Open Workbook"",
Function()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim instance = GetInstance(handle)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim workbooks As object = GetProperty(instance, ""Workbooks"")
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim wb As Object = Invoke(workbooks, ""Open"", filename, 0, True)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke(wb, ""Activate"")
&amp;nbsp;&amp;nbsp;&amp;nbsp; Return wb.Name
End Function)

&amp;nbsp;
&lt;A href="https://msdn.microsoft.com/en-gb/vba/excel-vba/articles/workbooks-open-…" target="test_blank"&gt;https://msdn.microsoft.com/en-gb/vba/excel-vba/articles/workbooks-open-…&lt;/A&gt;
Second parameter is UpdateLinks, you'd want 0 or 2 most likely:

The help file defines the values as:
0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references

Third one is ReadOnly boolean
Some might find other parameters useful too...</description>
    <pubDate>Mon, 13 Aug 2018 03:28:00 GMT</pubDate>
    <dc:creator>AndreyKudinov</dc:creator>
    <dc:date>2018-08-13T03:28:00Z</dc:date>
    <item>
      <title>MS Excel VBO (Open Workbook) - In read only mode</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63879#M16744</link>
      <description>There is a great open workbook found in the BO provided by Blue Prism, however, I want to create a new page that gives me the open to Open WorkBook in Only Mode. Usually, the code is simple however the current Open WorkBook uses Invoke which is something I'm not familiar with using. How can a modified the code to open in read-only&amp;nbsp;mode using invoke?

name = ExecWithTimeout(Timeout, "Open Workbook",
Function()
&amp;nbsp; &amp;nbsp; Dim instance = GetInstance(handle)
&amp;nbsp; &amp;nbsp; Dim workbooks As object = GetProperty(instance, "Workbooks")
&amp;nbsp; &amp;nbsp; Dim wb As Object = Invoke(workbooks, "Open", filename)
&amp;nbsp; &amp;nbsp; Invoke(wb, "Activate")
&amp;nbsp; &amp;nbsp; Return wb.Name
End Function)</description>
      <pubDate>Tue, 07 Aug 2018 17:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63879#M16744</guid>
      <dc:creator>ChiragSurati</dc:creator>
      <dc:date>2018-08-07T17:44:00Z</dc:date>
    </item>
    <item>
      <title>Hi cvs0115
You can simply…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63880#M16745</link>
      <description>Hi cvs0115
You can simply alter the code from:
Dim wb as Object = GetInstance(handle).Workbooks.Open(filename)
to
Dim wb as Object = GetInstance(handle).Workbooks.Open(filename, ReadOnly:=True)
Then you open the Excel workbook as read only.
Good luck.
&amp;nbsp;
BR,
Mustafa
&amp;nbsp;</description>
      <pubDate>Tue, 07 Aug 2018 18:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63880#M16745</guid>
      <dc:creator>Mustafa_UlasYig</dc:creator>
      <dc:date>2018-08-07T18:00:00Z</dc:date>
    </item>
    <item>
      <title>Mustafa,
The code worked…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63881#M16746</link>
      <description>Mustafa,
The code worked great on my look machine however it seems that I'm getting an error on our RR stating Compile error in hidden module: ThisWorkbook.</description>
      <pubDate>Tue, 07 Aug 2018 19:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63881#M16746</guid>
      <dc:creator>ChiragSurati</dc:creator>
      <dc:date>2018-08-07T19:34:00Z</dc:date>
    </item>
    <item>
      <title>Capture</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63882#M16747</link>
      <description>Capture</description>
      <pubDate>Tue, 07 Aug 2018 19:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63882#M16747</guid>
      <dc:creator>ChiragSurati</dc:creator>
      <dc:date>2018-08-07T19:35:00Z</dc:date>
    </item>
    <item>
      <title>Hi cvs0115
Great.
That…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63883#M16748</link>
      <description>Hi cvs0115
Great.
That compile error&amp;nbsp;has nothing to do with BP, this is an Excel compile&amp;nbsp;error, you can try this solution for Office 2010 on XP/Win 7:
&lt;A href="https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other/compile-error-in-hidden-module-this-workbook/5da89258-34fa-4bcc-96bc-223787da6ada" target="test_blank"&gt;https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other/compile-error-in-hidden-module-this-workbook/5da89258-34fa-4bcc-96bc-223787da6ada&lt;/A&gt;
It probably also works for other versions of the office and windows packages.
Good luck.
BR,
Mustafa</description>
      <pubDate>Wed, 08 Aug 2018 13:33:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63883#M16748</guid>
      <dc:creator>Mustafa_UlasYig</dc:creator>
      <dc:date>2018-08-08T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Mustafa,
Thanks! You've been…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63884#M16749</link>
      <description>Mustafa,
Thanks! You've been extremely helpful. However, I tried that a while ago and I did not have any luck. I believe it has to do with old dll&amp;nbsp;files. I just took another approach and created a BO around it.&amp;nbsp;
Thanks again,
Chris</description>
      <pubDate>Wed, 08 Aug 2018 19:23:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63884#M16749</guid>
      <dc:creator>ChiragSurati</dc:creator>
      <dc:date>2018-08-08T19:23:00Z</dc:date>
    </item>
    <item>
      <title>Hi Chris
No problem, you're…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63885#M16750</link>
      <description>Hi Chris
No problem, you're welcome :)
BR,
Mustafa</description>
      <pubDate>Fri, 10 Aug 2018 13:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63885#M16750</guid>
      <dc:creator>Mustafa_UlasYig</dc:creator>
      <dc:date>2018-08-10T13:06:00Z</dc:date>
    </item>
    <item>
      <title>I use this version with…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63886#M16751</link>
      <description>I use this version with invoke to open read only:

name = ExecWithTimeout(Timeout, ""Open Workbook"",
Function()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim instance = GetInstance(handle)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim workbooks As object = GetProperty(instance, ""Workbooks"")
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim wb As Object = Invoke(workbooks, ""Open"", filename, 0, True)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoke(wb, ""Activate"")
&amp;nbsp;&amp;nbsp;&amp;nbsp; Return wb.Name
End Function)

&amp;nbsp;
&lt;A href="https://msdn.microsoft.com/en-gb/vba/excel-vba/articles/workbooks-open-…" target="test_blank"&gt;https://msdn.microsoft.com/en-gb/vba/excel-vba/articles/workbooks-open-…&lt;/A&gt;
Second parameter is UpdateLinks, you'd want 0 or 2 most likely:

The help file defines the values as:
0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references

Third one is ReadOnly boolean
Some might find other parameters useful too...</description>
      <pubDate>Mon, 13 Aug 2018 03:28:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/MS-Excel-VBO-Open-Workbook-In-read-only-mode/m-p/63886#M16751</guid>
      <dc:creator>AndreyKudinov</dc:creator>
      <dc:date>2018-08-13T03:28:00Z</dc:date>
    </item>
  </channel>
</rss>

