next没有for vba提示next没有for
因为For循环内的if没有end if.改为:For i = 1 To 100 If isnarc(a(i)) = True Then sum = sum + a(i) end if Next i 或:For i = 1 To 100 If isnarc(a(i)) = True Then sum = sum + a(i).
原因:如果if..then.语句放在两行上,必须用end if 结尾,所以你缺了一个end if,像这种情况vb中只提示“for 缺少next”,似乎描述不清楚,但熟悉了就知道了. ——如.
next没有for怎么解决?Dim n As Integer Adodc2.Recordset.MoveFirst For k = 0 To Combo2.ListCount n = . = Adodc1.Recordset("公交路线号") n=n+1 Exit For End If Next i '提示next没有for.
写vb时出现错误:next没有for是怎么回事啊?for没有next表示for循环结束,没有写next vb中for语法 for=to[step步长] [exit for] next如果只写了for,最后结束时没有写next,就会报for没有next的错误.
next 没有for 是怎么回事呀..?要么就是你一个for 没有对应一个next 要么就是你for 中间有 if 而你end if 又写在 next 后面 不符合语法要求
excel 宏,运行时提示 next 没有 for把你的 第一个 Exit For 删除掉就好了., Exit For 意思是跳出 循环了.要不就是你第一个next i 之前的 if 因没有endif 而 报的错
提示我NEXT没有FOR是因为 for i = 1 to i1 s1 = mid(s, i, 5) if isdate(s1) = true then print s1 end if '在这里加上 end if 就可以了 next i 这里的if 语句没有相应的 end if.
vba中总是提示next没有forVBA代码的语法是不能这样写滴!正确的写法:Public Sub BUG()'' Macro1 Macro' . Dim A As Integer Dim B As String Dim C As Integer For A = 1 To 100 B = CStr(2 ^ A) C .
Next 没有 ForFor I = 1 To 7 C(I) = A(I) Next I For I = 1 To 8 Point = 1 Do While C(Point) < B(I) Point = Point + 1 Exit Do If C(Point + 1) > B(I) Then For J = UBound(C) - 1 To Point + 1 Step -1 C(J + 1) = C(J) Next J C(Point + 1) = B(I) End If Loop '是这里少了一个退出循环 Next I Print "数组C为:"; For I = 1 To 15 Print C(I); Next I
vb 为什么说我的next没有for ?????代码如下;代码混乱,不知所云.