TheSwamp
Code Red => VB(A) => Topic started by: David Hall on June 11, 2007, 04:35:54 PM
-
Im looking for a very simple example of using while or Do While to pick points til user hits enter to stop. I tried using
While Not Pt2 = Null
and every variation I could think of, but couldn't get it. Im sure its simple, I just cant get it.
thanks
-
I've used this one
~'J'~
'' written by Tony Tanzillo
'' request check "Break on Unhandled Errors" in General options
Public Sub LoopExample()
Dim Msg As String
Msg = vbCrLf & "First point: "
Dim MyPoint As Variant
Do
On Error Resume Next
MyPoint = ThisDrawing.Utility.GetPoint(, Msg)
If Err Then
Err.Clear
Exit Do
End If
On Error GoTo 0
' Process the entered point here
ThisDrawing.ModelSpace.AddCircle MyPoint, 10#
Msg = vbCrLf & "Next point or ENTER to exit: "
Loop
On Error GoTo 0
End Sub
-
Thats what I was looking for. thanks
-
Thanks to Tony :)
~'J'~