whilie...wend循环的跳出
<p>While Not finished<br/>point3D = ThisDrawing.Utility.GetPoint(, "click on next point or red circle to finish!")<br/>If Sqr(point3D(0) ^ 2 + point3D(1) ^ 2 + point3D(2) ^ 2) < circleradius Then<br/>finshed = True<br/>outercircle(0).Delete<br/>ThisDrawing.Regen acActiveViewport<br/>Else<br/>numberofelements = numberofelements + 3<br/>ReDim Preserve polyarray(0 To numberofelements)<br/>polyarray(numberofelements - 2) = point3D(0)<br/>polyarray(numberofelements - 1) = point3D(1)<br/>polyarray(numberofelements) = point3D(2)<br/>Set newpoint = ThisDrawing.ModelSpace.AddPoint(point3D)<br/>If numberofelements > 2 Then redrawpolyline<br/>End If<br/>Wend</p><p>各位高手,这是绘制图形并填充图形VBA代码的一部分,小弟通过逐步调试发现程序无法跳出该循环,请教各位高手WHILE。。。WEND语句怎样在符合条件后跳出!</p> 在要跳出该循环的地方finshed = False 我更喜欢Do~~~~~~~Loop循环,在循环中使用Exit Do即可跳出。 准确地说是退出当前循环的。
页:
[1]