VBA在执行启动代码时进入调试? [英] VBA entering debugging when startup code is executed?

查看:73
本文介绍了VBA在执行启动代码时进入调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在其中提供一些代码:

I have some code in:

Workbook_Open()

它的行为异常。
(我先删除所有VBA模块,然后再导入它们,已删除的模块停留的时间足够长,以至于无法干扰导入...)

And it misbehave. (I remove all VBA modules and then import them, and "removed" modules stay long enough to interfere with importing...)

如何调试此类代码?

推荐答案

您可以通过放置<$来调试 Workbook_Open 在第一行代码之前执行c $ c> Stop 命令,保存并关闭工作簿,然后重新打开它并使用 F8 逐步执行代码

You can debug your Workbook_Open by placing a Stop command before the first line of code, save and close the workbook then re-open it and step through the code using F8.

这篇关于VBA在执行启动代码时进入调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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