一段代码
请看看这段代码:
Private Sub Command1_Click()
Dim Sum As Integer, I As Integer
Sum = 0
For I = 1 To 100
Sum = Sum + I
Next
MsgBox "1+3+5+...+99= " & Sum, "求和 "
End Sub
运行的错误是说“类型不匹配”,请问为什么?要怎么改呢?
[解决办法]
MsgBox "1+3+5+...+99= " & Sum, vbOKOnly, "求和 "