maomao2004 发表于 2005-3-14 10:05:00

求助。请大家帮忙!急

我是一个新手,碰到一个问题,以下引号内是我编的CAD命令,我看现在太麻烦,能不能帮我做一个循环命令,新手,我不会,请大家帮助!



Private Sub CommandButton1_Click()<BR>ThisDrawing.SendCommand "ct00" &amp; vbCr<BR>ThisDrawing.SendCommand "ct01" &amp; vbCr<BR>ThisDrawing.SendCommand "ct02" &amp; vbCr<BR>ThisDrawing.SendCommand "ct03" &amp; vbCr<BR>ThisDrawing.SendCommand "ct04" &amp; vbCr<BR>ThisDrawing.SendCommand "ct05" &amp; vbCr<BR>ThisDrawing.SendCommand "ct06" &amp; vbCr<BR>ThisDrawing.SendCommand "ct07" &amp; vbCr<BR>ThisDrawing.SendCommand "ct08" &amp; vbCr<BR>ThisDrawing.SendCommand "ct09" &amp; vbCr<BR>End Sub

yufeng_cn 发表于 2005-3-14 22:53:00

Private Sub CommandButton1_Click()


for i=        0 to 9


        a$="ct0"+trim(str(i))


ThisDrawing.SendCommand        a$ &amp; vbCr<BR>


next<BR>End Sub


试试行不行!
页: [1]
查看完整版本: 求助。请大家帮忙!急