VisualBasic Word 中没有与应用程序关联的等待方法 [英] There is no Wait Method associated with Application in VisualBasic Word

查看:44
本文介绍了VisualBasic Word 中没有与应用程序关联的等待方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有运行特定代码的 VBA 代码,我试图通过使用以下行为其提供 3 秒的等待时间来暂停下一次执行:

I have VBA code to run a particular code and I am trying to pause the next execution by giving it a wait time of 3 seconds using the following line:

Application.Wait (Now + TimeValue("00:00:03"))

但我收到以下错误:

错误:未找到方法或数据变量

Error: Method or data variable not found

推荐答案

我尝试了 Excel.Application.Wait(Now + TimeValue("00:00:03")) 并且它像一个魅力!

I tried Excel.Application.Wait(Now + TimeValue("00:00:03")) and it worked like a charm!

这篇关于VisualBasic Word 中没有与应用程序关联的等待方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆