类似帖子中的答案都没有奏效。我有一个XY散点图,其中包含我想要使用For-Next循环更改的值。这个支持宏的工作簿已运行多年,但最近停止使用Windows 10更新。这是包含我尝试过的没有解决问题的注释掉的行的代码。
Private Sub CommandButton1_Click()
Dim j As Integer 'ran it under Option Explicit and it made no difference
Dim i As Integer
For j = 1 To 3
For i = 1 To 36 ' location of the coaster
'Application.ScreenUpdating = True 'made no difference
Range("D6").Value = i 'this is the location of the coaster
Calculate 'this updates the chart (only now it doesn't update the chart anymore)
'Application.Wait Now + #12:00:01 AM# 'Wait 1 second between steps (it was too slow) and it made no difference
Next i
Next j
End Sub
所以这可能与Win 10中更高版本的Excel有关。