[请教]VBA for EXCEL 问题

老兵新手

新手上路
注册
2003-10-24
消息
198
荣誉分数
0
声望点数
0
为什么下面一段程序在 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 时的路径,怎么解决,那位高人能指点一下。
先谢了。
 
后退
顶部
首页 论坛
消息
我的