且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么命令'stop'不会暂停执行访问VBA代码?

更新时间:1970-01-01 07:57:00

VBA支持断点。只需单击希望调试器停止的行,然后单击F9。没有必要用停止来代码。



否,断点不会随项目一起保存。是的,你必须在每次想要使用它们时设置它们。



此外,你不必每次想要运行时关闭并重新打开项目它。 Autoexec只应用于初始化代码,而不是用于运行项目中的所有内容。
VBA supports breakpoints. Just click on the line you want the debugger to stop on and hit F9. There is no need to pepper the code with "Stop".

No, breakpoints are not saved with the project. Yes, you have to set them every time you want to use any.

Also, you should not have to close and the reopen the project every time you want to run it. Autoexec should only be used to initialize the code, not to run everything in the project.