执行特定语句
在代码的执行操作停止时,您可以控制过程内语句的执行顺序。 可以在选择的语句处恢复执行,而无需执行任何干预代码。
设置要执行的下一个语句
In the Code window, position the insertion point anywhere within the statement.
在 “调试 ”菜单上,选择“ 设置下一个语句 (ctrl+F9) ,或在 Windows 上,将鼠标指针置于当前执行点旁边的 边距指示器 中。
将边距指示器中的黄色箭头拖到接下来要执行的语句。
注意
[!注释] 您只能跳到同一过程内的语句。
Used in combination with Step Into, executing specific statements with the Set Next Statement command enables you to step through procedures one statement at a time, and to closely examine your code. 这对更正或避免运行时错误情况也有很大的帮助。
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈