Sub Test()
Dim g1val As Integer
g1val = 0
For i = 3 To 27
If g1val >= Cells(33, i).Value Then
g1val = g1val
ElseIf g1val < Cells(33, i).Value Then
g1val = Cells(33, i).Value
End If
Next i
End Sub
在这里,当我将切换断点放在第 3 行并按 F8 执行时,在更快的执行中,'g1val' 不会获取任何值。当我执行没有任何断点的代码时也会发生同样的情况。你能帮忙吗????