注册 登录
编程论坛 VB6论坛

怎么老提示next没有for

青年刘 发布于 2015-04-10 11:33, 387 次点击
For c = 0 To 9
   If Text21(c).Text = "*" Then
   n = Text1(c).Text
      If Text11(c) = 0 Then
      Exit For
      End If
      Next
   End If
For a1 = 0 To 9
    If Text21(a1).Text = "*" Then
    p = Text1(a1).Text
       If Text11(a1) = 0 Then
       Exit For
       End If
       Next
    End If
For a2 = 0 To 9
    If Text21(a2).Text = "*" Then
    q = Text1(a2).Text
       If Text11(a2) = 0 Then
       Exit For
       End If
       Next
    End If
    Text81.Text = n
    Text82.Text = p
    Text83.Text = q
这个代码怎么老提示next 没有for
1 回复
#2
chen35232015-04-10 13:18
For a2 = 0 To 9
    If Text21(a2).Text = "*" Then
        q = Text1(a2).Text
        If Text11(a2) = 0 Then
          Exit For
        End If
Next
    End If
发现了吧,循环交叉了
1