<?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: End Command in a loop in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623984#M14138</link>
    <description>You're  welcome&lt;BR /&gt;
And thanks to Tony Tanzillo &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
    <pubDate>Fri, 29 Jan 2010 08:22:26 GMT</pubDate>
    <dc:creator>Hallex</dc:creator>
    <dc:date>2010-01-29T08:22:26Z</dc:date>
    <item>
      <title>End Command in a loop</title>
      <link>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623981#M14135</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
Im new on VBA, so please bear with me.  What I'm trying to do is to be able &lt;BR /&gt;
to end a command when desired.  Right now  I have a GoTo estatement to &lt;BR /&gt;
repeat a process where is going to keep asking me for selection of objects &lt;BR /&gt;
and some input information.  How can I have the user to stop this Loop when &lt;BR /&gt;
is desired to end the command?&lt;BR /&gt;
An example below is ilustrated.  Help would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Line1:&lt;BR /&gt;
pnt = ThisDrawing.Utility.GetPoint(, "Select Point on Surface: ")&lt;BR /&gt;
srfelev = oSurf.FindElevationAtXY(pnt(0), pnt(1))&lt;BR /&gt;
Dim overt As Integer&lt;BR /&gt;
ofet.Elevation = srfelev + eldif&lt;BR /&gt;
GoTo Line1&lt;BR /&gt;
&lt;BR /&gt;
How to end this process?</description>
      <pubDate>Thu, 28 Jan 2010 21:25:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623981#M14135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-28T21:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: End Command in a loop</title>
      <link>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623982#M14136</link>
      <description>I like this nice code:&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
'' written by Tony Tanzillo&lt;BR /&gt;
'' request check "Break on Unhandled Errors" in  General options&lt;BR /&gt;
Public Sub LoopExample()&lt;BR /&gt;
Dim Msg As String&lt;BR /&gt;
Msg = vbCrLf &amp;amp; "First point: "&lt;BR /&gt;
Dim MyPoint As Variant&lt;BR /&gt;
Do&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
MyPoint = ThisDrawing.Utility.GetPoint(, Msg)&lt;BR /&gt;
If Err Then&lt;BR /&gt;
Err.Clear&lt;BR /&gt;
Exit Do&lt;BR /&gt;
End If&lt;BR /&gt;
On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
' Process the entered point here:&lt;BR /&gt;
ThisDrawing.ModelSpace.AddCircle MyPoint, 10#&lt;BR /&gt;
Msg = vbCrLf &amp;amp; "Next point or ENTER to exit: "&lt;BR /&gt;
Loop&lt;BR /&gt;
On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Thu, 28 Jan 2010 23:17:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623982#M14136</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-01-28T23:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: End Command in a loop</title>
      <link>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623983#M14137</link>
      <description>Thanks so much&lt;BR /&gt;
&lt;HALLEX&gt; wrote in message news:6326711@discussion.autodesk.com...&lt;BR /&gt;
I like this nice code:&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
'' written by Tony Tanzillo&lt;BR /&gt;
'' request check "Break on Unhandled Errors" in  General options&lt;BR /&gt;
Public Sub LoopExample()&lt;BR /&gt;
Dim Msg As String&lt;BR /&gt;
Msg = vbCrLf &amp;amp; "First point: "&lt;BR /&gt;
Dim MyPoint As Variant&lt;BR /&gt;
Do&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
MyPoint = ThisDrawing.Utility.GetPoint(, Msg)&lt;BR /&gt;
If Err Then&lt;BR /&gt;
Err.Clear&lt;BR /&gt;
Exit Do&lt;BR /&gt;
End If&lt;BR /&gt;
On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
' Process the entered point here:&lt;BR /&gt;
ThisDrawing.ModelSpace.AddCircle MyPoint, 10#&lt;BR /&gt;
Msg = vbCrLf &amp;amp; "Next point or ENTER to exit: "&lt;BR /&gt;
Loop&lt;BR /&gt;
On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/HALLEX&gt;</description>
      <pubDate>Fri, 29 Jan 2010 00:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623983#M14137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-29T00:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: End Command in a loop</title>
      <link>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623984#M14138</link>
      <description>You're  welcome&lt;BR /&gt;
And thanks to Tony Tanzillo &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Fri, 29 Jan 2010 08:22:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/end-command-in-a-loop/m-p/2623984#M14138</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-01-29T08:22:26Z</dc:date>
    </item>
  </channel>
</rss>

