<?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: Get multiple Excel instances in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583508#M960</link>
    <description>&lt;P&gt;What exactly are you trying to do. The GetObject funtion will only get an app from the Running Object Table if xl is open already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use this function to get an xl app object.&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Public Function GetXL() As Application
    On Error Resume Next
    Dim xlApp As Application
    Set xlApp = GetObject(, "Excel.Application")
    If xlApp Is Nothing Then
        Set xlApp = CreateObject("Excel.Application")
    End If
    Set GetXL = xlApp
End Function&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 26 Feb 2024 16:07:10 GMT</pubDate>
    <dc:creator>Ed__Jobe</dc:creator>
    <dc:date>2024-02-26T16:07:10Z</dc:date>
    <item>
      <title>Get multiple Excel instances</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583104#M957</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;How can I retrieve all opened Excel instances? Currently, I'm only able to retrieve one instance.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 13:27:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583104#M957</guid>
      <dc:creator>aammarJHHNU</dc:creator>
      <dc:date>2024-02-26T13:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get multiple Excel instances</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583438#M958</link>
      <description>&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/vba/post-your-code/td-p/12324653/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;show your code&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 15:43:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583438#M958</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-02-26T15:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get multiple Excel instances</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583467#M959</link>
      <description>&lt;LI-CODE lang="visual-basic"&gt;    Set EXCELApplication = GetObject(, "Excel.Application")
    If EXCELApplication.Workbooks.Count = 0 Then
        MsgBox "No Excel file is open"
        Exit Sub
    End If
    On Error Resume Next
    Set ExcelWorksheet = EXCELApplication.Workbooks("AAA").Sheets.Item("Update")
    If Err.Description &amp;lt;&amp;gt; "" Then
        MsgBox "Verify that the file is open", vbInformation, "File not found"
        Exit Sub
    End If&lt;/LI-CODE&gt;&lt;P&gt;Sometimes, even when the file is open, I get the message 'No Excel file is open.' Or, when two instances are open and one of them is my file, I get the message 'Verify that the file is open'.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 15:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583467#M959</guid>
      <dc:creator>aammarJHHNU</dc:creator>
      <dc:date>2024-02-26T15:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get multiple Excel instances</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583508#M960</link>
      <description>&lt;P&gt;What exactly are you trying to do. The GetObject funtion will only get an app from the Running Object Table if xl is open already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use this function to get an xl app object.&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Public Function GetXL() As Application
    On Error Resume Next
    Dim xlApp As Application
    Set xlApp = GetObject(, "Excel.Application")
    If xlApp Is Nothing Then
        Set xlApp = CreateObject("Excel.Application")
    End If
    Set GetXL = xlApp
End Function&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Feb 2024 16:07:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583508#M960</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2024-02-26T16:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get multiple Excel instances</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583874#M961</link>
      <description>&lt;P&gt;GetObject() would return only one instance of Excel application, if there are multiple instances running, and there is no guarantee the one in interest is returned (there is why you get "Verify..." message). There is a way to (complicated to most VBA coders, I'd say), to identify which instance is the one you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I were you, I'll simply prompt user to either open the Excel sheet file with Excel (if there is no Excel is running), or close other Excel instances (if multiple instances are running). While this would be simplest/quickest solution, automating running Excel app (or the other way around by automating AutoCAD from Excel VBA) is hardly a good solution, IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 15:23:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-multiple-excel-instances/m-p/12583874#M961</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2024-02-27T15:23:22Z</dc:date>
    </item>
  </channel>
</rss>

