for i = 1 to n
    for each x in y
        for j = 1 to n
            if ...then
            跳到i循环
        next j
    next x
next i

解决方案 »

  1.   

    用 goto 简单for i = 1 to n
    for each x in y
    for j = 1 to n
       if ...then
          goto ForOver
       End If
    next j
    next x
    next i
    ForOver:
      

  2.   


    dim s as boolean
    for i = 1 to n
    for each x in y
    for j = 1 to n
    if ...then
    s=true
    exit for
    next j
    if s=true then exit for
    next x
    if s=true then exit for
    next i
      

  3.   

    建议用1楼的GOTO,这种情况搞一堆exit for看着太累了
      

  4.   

    for i = 1 to n
        do
            for each x in y
                for j = 1 to n
                    if ...then exit do
                        '跳到i循环
                  next j
            next x
            exit do
        loop
    next i
      

  5.   


    Sub XXX()
    for i = 1 to n
    for each x in y
    for j = 1 to n
       if ...then
          Exit Sub
       End If
    next j
    next x
    next i
    End Sub