我有一段完整的case 程序(想上传附件,怎么也不会搞)请大师帮我分析一下:
Case "lll"
dim h As Integer
for h=60 to 130 step 10
dim i As Integer
if e.row("lwan1a") < h then
for i = 1 to Tables("jiben").rows.count-f-1
Dim j As Integer
Dim a As Integer
if Tables("jiben").rows(f+i)("lwan1a")=h
for j=1 to 20
if f+i+j=Tables("jiben").rows.count-f then
exit for
end if
if Tables("jiben").rows(f+i+j)("wan1a")="★"
a=a+1
if a=5 then
exit for
end if
else
a=a-1
if a=-5 then
exit for
end if
end if
next
Tables("jiben").rows(f+i)("lll")=a
exit for
end if
next
end if
next
按照我的目的,最后一个循环应该得到-5到5之间的数,但结果有这之外的数,而且还没有负数,这个问题困扰我好久了,请大师指点