为什么下面一段程序在 Debug 状态和直接 Run 状态走不同的路径:
Sub UpdatedTable()
ActiveSheet.QueryTables("Qry").Refresh
If ActiveSheet.QueryTables("Qry").Refreshing = False Then
MsgBox ("Debug comes into this path")
Else
MsgBox ("Direct running comes this path")
End If
End Sub
好像不是时间同步的问题。我想让它在 Run 的状态也走 Debug 时的路径,怎么解决,那位高人能指点一下。
先谢了。
Sub UpdatedTable()
ActiveSheet.QueryTables("Qry").Refresh
If ActiveSheet.QueryTables("Qry").Refreshing = False Then
MsgBox ("Debug comes into this path")
Else
MsgBox ("Direct running comes this path")
End If
End Sub
好像不是时间同步的问题。我想让它在 Run 的状态也走 Debug 时的路径,怎么解决,那位高人能指点一下。
先谢了。