Select Case istatus
Case "新建"
s(0)=s(0)+1
Case "打回"
s(1)=s(1)+1
Case "公认"
s(2)=s(2)+1
Case "已确定"
s(3)=s(3)+1
Case "已分派"
s(4)=s(4)+1
Case "已解决"
s(5)=s(5)+1
Case "已关闭"
s(6)=s(6)+1
End Select
为什么老 出现语法错误,而将没s(i)=s(i)+1每一行都想前移后就对了, Case 语句有什么规定吗?
不知道你出现什么语法错误,我在我机器上调试是可以的:
istatus="公认"
Dim s(7)
Select Case istatus
Case "新建"
s(0)=s(0)+1
Case "打回"
s(1)=s(1)+1
Case "公认"
s(2)=s(2)+1
Case "已确定"
s(3)=s(3)+1
Case "已分派"
s(4)=s(4)+1
Case "已解决"
s(5)=s(5)+1
Case "已关闭"
s(6)=s(6)+1
End Select