<?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: GetObject command in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322484#M93142</link>
    <description>Getting the aplication doesn't necessarily get you the document. GetObject(,&lt;BR /&gt;
"AutoCAD.Application") won't yield the active document in a running instance&lt;BR /&gt;
of AutoCAD. See if you can use the ActiveWorkbook property to get your&lt;BR /&gt;
document reference.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Visit AcadXtreme for a chance to win a copy of AutoCAD LT 2000&lt;BR /&gt;
Contest ends 5/26/00&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
&lt;BR /&gt;
"John Wilde" &lt;JWILDE&gt; wrote in message&lt;BR /&gt;
news:ef1cfbe.-1@WebX.SaUCah8kaAW...&lt;BR /&gt;
&amp;gt; I am trying to use the following command to retrieve the currently active&lt;BR /&gt;
&amp;gt; Excel workbook.&lt;BR /&gt;
&amp;gt;      Set ExcelServer = GetObject(, "Excel.Application")&lt;BR /&gt;
&amp;gt;         ExcelServer.WindowState = XlWindowState.xlMinimized&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; According to the help file:  "If the pathname argument is omitted,&lt;BR /&gt;
GetObject&lt;BR /&gt;
&amp;gt; returns a currently active object of the specified type"  I find that if I&lt;BR /&gt;
&amp;gt; have an instance of Excel running and I execute the command it returns an&lt;BR /&gt;
&amp;gt; empty excel window, but not the current workbook, which is what I want.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What am i missing?&lt;BR /&gt;
&amp;gt;&lt;/JWILDE&gt;</description>
    <pubDate>Fri, 26 May 2000 18:34:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-05-26T18:34:04Z</dc:date>
    <item>
      <title>GetObject command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322483#M93141</link>
      <description>I am trying to use the following command to retrieve the currently active&lt;BR /&gt;
Excel workbook.&lt;BR /&gt;
     Set ExcelServer = GetObject(, "Excel.Application")&lt;BR /&gt;
        ExcelServer.WindowState = XlWindowState.xlMinimized&lt;BR /&gt;
&lt;BR /&gt;
According to the help file:  "If the pathname argument is omitted, GetObject&lt;BR /&gt;
returns a currently active object of the specified type"  I find that if I&lt;BR /&gt;
have an instance of Excel running and I execute the command it returns an&lt;BR /&gt;
empty excel window, but not the current workbook, which is what I want.&lt;BR /&gt;
&lt;BR /&gt;
What am i missing?</description>
      <pubDate>Fri, 26 May 2000 18:22:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322483#M93141</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-05-26T18:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322484#M93142</link>
      <description>Getting the aplication doesn't necessarily get you the document. GetObject(,&lt;BR /&gt;
"AutoCAD.Application") won't yield the active document in a running instance&lt;BR /&gt;
of AutoCAD. See if you can use the ActiveWorkbook property to get your&lt;BR /&gt;
document reference.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Visit AcadXtreme for a chance to win a copy of AutoCAD LT 2000&lt;BR /&gt;
Contest ends 5/26/00&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
&lt;BR /&gt;
"John Wilde" &lt;JWILDE&gt; wrote in message&lt;BR /&gt;
news:ef1cfbe.-1@WebX.SaUCah8kaAW...&lt;BR /&gt;
&amp;gt; I am trying to use the following command to retrieve the currently active&lt;BR /&gt;
&amp;gt; Excel workbook.&lt;BR /&gt;
&amp;gt;      Set ExcelServer = GetObject(, "Excel.Application")&lt;BR /&gt;
&amp;gt;         ExcelServer.WindowState = XlWindowState.xlMinimized&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; According to the help file:  "If the pathname argument is omitted,&lt;BR /&gt;
GetObject&lt;BR /&gt;
&amp;gt; returns a currently active object of the specified type"  I find that if I&lt;BR /&gt;
&amp;gt; have an instance of Excel running and I execute the command it returns an&lt;BR /&gt;
&amp;gt; empty excel window, but not the current workbook, which is what I want.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What am i missing?&lt;BR /&gt;
&amp;gt;&lt;/JWILDE&gt;</description>
      <pubDate>Fri, 26 May 2000 18:34:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322484#M93142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-05-26T18:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject command</title>
      <link>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322485#M93143</link>
      <description>This works for me&lt;BR /&gt;
&lt;BR /&gt;
'Set oExcelBook = oExcelApp.Workbooks.Add&lt;BR /&gt;
Set oExcelSheet = oExcelApp.ActiveWorkbook.Sheets("Sheet1")&lt;BR /&gt;
&lt;BR /&gt;
Gary</description>
      <pubDate>Fri, 26 May 2000 19:02:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/getobject-command/m-p/322485#M93143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-05-26T19:02:22Z</dc:date>
    </item>
  </channel>
</rss>

