ExcelVBA代码运行过程时出错6 提示"溢出"
Sub练习题3()DimsumAsInteger,iAsIntegersum=0i=2DoUntilsum>50000IfRange("B"&i)<>xlCellType...
Sub 练习题3() Dim sum As Integer, i As Integer sum = 0 i = 2 Do Until sum > 50000 If Range("B" & i) <> xlCellTypeBlanks Then sum = sum + Range("B" & i) i = i + 1 Else MsgBox "所有数据总未超过5万" End If Loop MsgBox "在第" & i - 2 & "天总和超出5万,总和为:" & sumEnd Sub
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询