[英]Overflow Error 6 Excel VBA
I'm using a counter to keep track of true/false conditions in a range, with the value of that counter used to determine further action. 我正在使用一个计数器来跟踪某个范围内的真/假条件,该计数器的值用于确定进一步的操作。 However, I'm getting an overflow error even when a small (15 row) data set is being read.
但是,即使正在读取小的(15行)数据集,我也会出现溢出错误。 Here's the code:
这是代码:
Dim b As Double 'Exceptions Sheet
Dim u As Integer 'Unhandled exception counter
b = 2
Sheets("Exceptions").Activate
Do While Sheets("Exceptions").Cells(b, 2).Value <> ""
If Sheets("Exceptions").Cells(b, 14).Value <> "A" Then
u = u + 1
End If
Loop
b = b + 1
~Thanks~ 〜谢谢〜
您没有在循环中更改b
的值,因此它只会不断增加u
直到溢出
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.