<?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: Help with util.InitializeUserInput use in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356267#M71560</link>
    <description>Hi there,&lt;BR /&gt;
I could be wrong but I thought you needed to check what was in the Err&lt;BR /&gt;
object rather than just assuming the object was there.&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
    [Do something]&lt;BR /&gt;
End If&lt;BR /&gt;
By doing this as your first conditional test you can eliminate your nested&lt;BR /&gt;
If-Then which checks for the Error description.  Checking for an error&lt;BR /&gt;
number is far easier than checking the error description.&lt;BR /&gt;
&lt;BR /&gt;
Also note that the Err properties are automatically set ot zero or "" when&lt;BR /&gt;
any form of the Resume statement is used.  Even though the Clear method is&lt;BR /&gt;
valid and useful there is no need to use it as you have done.&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps a little or even a lot.&lt;BR /&gt;
Jason&lt;BR /&gt;
&lt;BR /&gt;
Rakesh Rao &lt;RAKESH.RAO&gt; wrote in message&lt;BR /&gt;
news:3D5F5380.9A0F5138@vsnl.net...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Hello,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I am trying to use keywords in response to a getpoint function. For some&lt;BR /&gt;
&amp;gt; reason, VBA goes into an unhandled error. What am I doing wrong? I need&lt;BR /&gt;
&amp;gt; to pick a point or simply ENTER or type Open, Close, Fir Spline Xit in&lt;BR /&gt;
&amp;gt; response to getpoint.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; See attached code below. Any pointers are greatly appreciated.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards&lt;BR /&gt;
&amp;gt; Rakesh&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; On Error Resume Next&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
&amp;gt; util.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; pt1 = util.GetPoint(, vbCrLf + "Pick first point:")&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If Err Then&lt;BR /&gt;
&amp;gt;     If StrComp(Err.Description, "User input is a keyword", 1) = 0 Then&lt;BR /&gt;
&amp;gt;          ' One of the keywords was entered&lt;BR /&gt;
&amp;gt;              kwd = util.GetInput&lt;BR /&gt;
&amp;gt;              util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
&amp;gt;          Else&lt;BR /&gt;
&amp;gt;              util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
&amp;gt;              Err.Clear&lt;BR /&gt;
&amp;gt;          End If&lt;BR /&gt;
&amp;gt;     Err.Clear&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
&amp;gt; Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
&amp;gt; Build MyGeoTools @&lt;BR /&gt;
&amp;gt; http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
&amp;gt; FREE downloads : http://www.4d-technologies.com/techcenter&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/RAKESH.RAO&gt;</description>
    <pubDate>Sun, 18 Aug 2002 23:23:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-08-18T23:23:34Z</dc:date>
    <item>
      <title>Help with util.InitializeUserInput use</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356266#M71559</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to use keywords in response to a getpoint function. For some&lt;BR /&gt;
reason, VBA goes into an unhandled error. What am I doing wrong? I need&lt;BR /&gt;
to pick a point or simply ENTER or type Open, Close, Fir Spline Xit in&lt;BR /&gt;
response to getpoint.&lt;BR /&gt;
&lt;BR /&gt;
See attached code below. Any pointers are greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Rakesh&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
util.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&lt;BR /&gt;
pt1 = util.GetPoint(, vbCrLf + "Pick first point:")&lt;BR /&gt;
&lt;BR /&gt;
If Err Then&lt;BR /&gt;
    If StrComp(Err.Description, "User input is a keyword", 1) = 0 Then&lt;BR /&gt;
         ' One of the keywords was entered&lt;BR /&gt;
             kwd = util.GetInput&lt;BR /&gt;
             util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
         Else&lt;BR /&gt;
             util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
             Err.Clear&lt;BR /&gt;
         End If&lt;BR /&gt;
    Err.Clear&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
&lt;BR /&gt;
AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
Build MyGeoTools @&lt;BR /&gt;
http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
FREE downloads : http://www.4d-technologies.com/techcenter</description>
      <pubDate>Sat, 17 Aug 2002 23:57:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356266#M71559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-17T23:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with util.InitializeUserInput use</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356267#M71560</link>
      <description>Hi there,&lt;BR /&gt;
I could be wrong but I thought you needed to check what was in the Err&lt;BR /&gt;
object rather than just assuming the object was there.&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
    [Do something]&lt;BR /&gt;
End If&lt;BR /&gt;
By doing this as your first conditional test you can eliminate your nested&lt;BR /&gt;
If-Then which checks for the Error description.  Checking for an error&lt;BR /&gt;
number is far easier than checking the error description.&lt;BR /&gt;
&lt;BR /&gt;
Also note that the Err properties are automatically set ot zero or "" when&lt;BR /&gt;
any form of the Resume statement is used.  Even though the Clear method is&lt;BR /&gt;
valid and useful there is no need to use it as you have done.&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps a little or even a lot.&lt;BR /&gt;
Jason&lt;BR /&gt;
&lt;BR /&gt;
Rakesh Rao &lt;RAKESH.RAO&gt; wrote in message&lt;BR /&gt;
news:3D5F5380.9A0F5138@vsnl.net...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Hello,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I am trying to use keywords in response to a getpoint function. For some&lt;BR /&gt;
&amp;gt; reason, VBA goes into an unhandled error. What am I doing wrong? I need&lt;BR /&gt;
&amp;gt; to pick a point or simply ENTER or type Open, Close, Fir Spline Xit in&lt;BR /&gt;
&amp;gt; response to getpoint.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; See attached code below. Any pointers are greatly appreciated.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards&lt;BR /&gt;
&amp;gt; Rakesh&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; On Error Resume Next&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
&amp;gt; util.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; pt1 = util.GetPoint(, vbCrLf + "Pick first point:")&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If Err Then&lt;BR /&gt;
&amp;gt;     If StrComp(Err.Description, "User input is a keyword", 1) = 0 Then&lt;BR /&gt;
&amp;gt;          ' One of the keywords was entered&lt;BR /&gt;
&amp;gt;              kwd = util.GetInput&lt;BR /&gt;
&amp;gt;              util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
&amp;gt;          Else&lt;BR /&gt;
&amp;gt;              util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
&amp;gt;              Err.Clear&lt;BR /&gt;
&amp;gt;          End If&lt;BR /&gt;
&amp;gt;     Err.Clear&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
&amp;gt; Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
&amp;gt; Build MyGeoTools @&lt;BR /&gt;
&amp;gt; http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
&amp;gt; FREE downloads : http://www.4d-technologies.com/techcenter&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/RAKESH.RAO&gt;</description>
      <pubDate>Sun, 18 Aug 2002 23:23:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356267#M71560</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-18T23:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with util.InitializeUserInput use</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356268#M71561</link>
      <description>How can you get an error when you are using On Error Resume Next? The code&lt;BR /&gt;
you posted below cannot be causing it directly, are you sure it is not&lt;BR /&gt;
coming from another procedure that runs after what you have posted below?&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
  Jacob Dinardi&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Rakesh Rao" &lt;RAKESH.RAO&gt; wrote in message&lt;BR /&gt;
news:3D5F5380.9A0F5138@vsnl.net...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Hello,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I am trying to use keywords in response to a getpoint function. For some&lt;BR /&gt;
&amp;gt; reason, VBA goes into an unhandled error. What am I doing wrong? I need&lt;BR /&gt;
&amp;gt; to pick a point or simply ENTER or type Open, Close, Fir Spline Xit in&lt;BR /&gt;
&amp;gt; response to getpoint.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; See attached code below. Any pointers are greatly appreciated.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards&lt;BR /&gt;
&amp;gt; Rakesh&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; On Error Resume Next&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
&amp;gt; util.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; pt1 = util.GetPoint(, vbCrLf + "Pick first point:")&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If Err Then&lt;BR /&gt;
&amp;gt;     If StrComp(Err.Description, "User input is a keyword", 1) = 0 Then&lt;BR /&gt;
&amp;gt;          ' One of the keywords was entered&lt;BR /&gt;
&amp;gt;              kwd = util.GetInput&lt;BR /&gt;
&amp;gt;              util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
&amp;gt;          Else&lt;BR /&gt;
&amp;gt;              util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
&amp;gt;              Err.Clear&lt;BR /&gt;
&amp;gt;          End If&lt;BR /&gt;
&amp;gt;     Err.Clear&lt;BR /&gt;
&amp;gt; End If&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
&amp;gt; Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
&amp;gt; Build MyGeoTools @&lt;BR /&gt;
&amp;gt; http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
&amp;gt; FREE downloads : http://www.4d-technologies.com/techcenter&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/RAKESH.RAO&gt;</description>
      <pubDate>Mon, 19 Aug 2002 09:12:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356268#M71561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T09:12:50Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356269#M71562</link>
      <description>Hi Jacob,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your response.&lt;BR /&gt;
&lt;BR /&gt;
Here is my full code:&lt;BR /&gt;
&lt;BR /&gt;
I am unable to trap the keywords entered. Do you have a working example of how&lt;BR /&gt;
to do it?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Main()&lt;BR /&gt;
Dim util As AcadUtility&lt;BR /&gt;
Dim pickedPt, pt1, pt2 As Variant&lt;BR /&gt;
Dim objName As AcadEntity&lt;BR /&gt;
Dim ang As Double&lt;BR /&gt;
Dim kwd, kwdLst As String&lt;BR /&gt;
&lt;BR /&gt;
Set glAcad = GetObject(, "AutoCAD.Application")&lt;BR /&gt;
&lt;BR /&gt;
Set util = glAcad.ActiveDocument.Utility&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
util.Prompt vbCrLf + "Demonstrates use of utility objects for user&lt;BR /&gt;
interaction."&lt;BR /&gt;
&lt;BR /&gt;
Err.Clear&lt;BR /&gt;
&lt;BR /&gt;
kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
&lt;BR /&gt;
ThisDrawing.Utility.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&lt;BR /&gt;
pt1 = util.GetPoint(, "Pick first point:")&lt;BR /&gt;
&lt;BR /&gt;
If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;
    If Err.Description = "User input is a keyword" Then&lt;BR /&gt;
         ' One of the keywords was entered&lt;BR /&gt;
             kwd = util.GetInput&lt;BR /&gt;
             util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
         Else&lt;BR /&gt;
             util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
             Err.Clear&lt;BR /&gt;
         End If&lt;BR /&gt;
    Err.Clear&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Jacob Dinardi wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; How can you get an error when you are using On Error Resume Next? The code&lt;BR /&gt;
&amp;gt; you posted below cannot be causing it directly, are you sure it is not&lt;BR /&gt;
&amp;gt; coming from another procedure that runs after what you have posted below?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards,&lt;BR /&gt;
&amp;gt;   Jacob Dinardi&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Rakesh Rao" &lt;RAKESH.RAO&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:3D5F5380.9A0F5138@vsnl.net...&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Hello,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I am trying to use keywords in response to a getpoint function. For some&lt;BR /&gt;
&amp;gt; &amp;gt; reason, VBA goes into an unhandled error. What am I doing wrong? I need&lt;BR /&gt;
&amp;gt; &amp;gt; to pick a point or simply ENTER or type Open, Close, Fir Spline Xit in&lt;BR /&gt;
&amp;gt; &amp;gt; response to getpoint.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; See attached code below. Any pointers are greatly appreciated.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Regards&lt;BR /&gt;
&amp;gt; &amp;gt; Rakesh&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; On Error Resume Next&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; kwdLst = "Open Close Fit Spline Xit"&lt;BR /&gt;
&amp;gt; &amp;gt; util.InitializeUserInput 128, kwdLst&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; pt1 = util.GetPoint(, vbCrLf + "Pick first point:")&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; If Err Then&lt;BR /&gt;
&amp;gt; &amp;gt;     If StrComp(Err.Description, "User input is a keyword", 1) = 0 Then&lt;BR /&gt;
&amp;gt; &amp;gt;          ' One of the keywords was entered&lt;BR /&gt;
&amp;gt; &amp;gt;              kwd = util.GetInput&lt;BR /&gt;
&amp;gt; &amp;gt;              util.Prompt "Keyword entered was: " + kwd&lt;BR /&gt;
&amp;gt; &amp;gt;          Else&lt;BR /&gt;
&amp;gt; &amp;gt;              util.Prompt "Error in point selection" + Err.Description&lt;BR /&gt;
&amp;gt; &amp;gt;              Err.Clear&lt;BR /&gt;
&amp;gt; &amp;gt;          End If&lt;BR /&gt;
&amp;gt; &amp;gt;     Err.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; End If&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
&amp;gt; &amp;gt; Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
&amp;gt; &amp;gt; Build MyGeoTools @&lt;BR /&gt;
&amp;gt; &amp;gt; http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
&amp;gt; &amp;gt; FREE downloads : http://www.4d-technologies.com/techcenter&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
&lt;BR /&gt;
AutoCAD customization for Engineering/Mapping/GIS&lt;BR /&gt;
Get GeoTools @ http://www.4d-technologies.com/geotools&lt;BR /&gt;
Build MyGeoTools @ http://www.4d-technologies.com/geotools/my_geotools.htm&lt;BR /&gt;
FREE downloads : http://www.4d-technologies.com/techcenter&lt;/RAKESH.RAO&gt;</description>
      <pubDate>Tue, 20 Aug 2002 01:33:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356269#M71562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-20T01:33:23Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356270#M71563</link>
      <description>It looks like an external application not a VBA macro. In that case the&lt;BR /&gt;
instruction&lt;BR /&gt;
&lt;BR /&gt;
 Set glAcad = GetObject(, "AutoCAD.Application")&lt;BR /&gt;
&lt;BR /&gt;
only works if AutoCad is runnig. If Autocad is closed it generates an&lt;BR /&gt;
unhandled error (as you referred).&lt;BR /&gt;
&lt;BR /&gt;
The solution is well documented, you must begin in that way&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
' Proceso de conexión con AutoCAD&lt;BR /&gt;
Set aCAD = GetObject(, "AutoCAD.Application")&lt;BR /&gt;
If Err Then&lt;BR /&gt;
    Err.Clear&lt;BR /&gt;
    Set aCAD = CreateObject("AutoCAD.Application")&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        *** ERROR ***&lt;BR /&gt;
    End If&lt;BR /&gt;
End If</description>
      <pubDate>Wed, 21 Aug 2002 01:04:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-util-initializeuserinput-use/m-p/356270#M71563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-21T01:04:08Z</dc:date>
    </item>
  </channel>
</rss>

