VBA 项目资源管理器仍然显示由宏关闭的 Excel 工作簿
我创建了一个宏,用于打开 Excel 工作簿并执行一些操作,最后关闭文件。该宏运行良好。
现在,当我在 vba 编辑器中打开 VBA 项目资源管理器时。它显示宏已打开的文件列表,即使它们已关闭。如何从项目资源管理器窗口中删除它们?为什么它仍然显示已经关闭的 Excel 工作簿?有没有办法修复它或者它是一个限制?
I have created a macro that opens a excel workbook and performs some operations and then at the end it closes the file.The macro is running fine.
Now, when I open my VBA Project explorer in the vba editor. It shows the list of files that have been opened by the macro even though they are closed. How do i remove them from the project explorer window ? why its still showing the excel workbooks, which are already closed ? is there anyway to fix it or its a limitation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我自己找到了答案。
这是帮助我的链接 http://www.mrexcel.com/forum /showthread.php?t=50086
I found the answer myself.
This is the link that helped me http://www.mrexcel.com/forum/showthread.php?t=50086
进一步的情报。我遇到了同样的问题,并且正在使用 Google Drive(以前的 Google 桌面)。我发现我可以在仍然使用 Google Drive 的同时解决问题,不仅要确保 set wb = Nothing,还要检查
当以编程方式关闭文件时,Application.EnableEvents = True。
希望这对某人有帮助 - 正如上面对我的帮助一样
Further intel. I had the same problem and was using Google Drive (previously Google desktop). I found I could resolve the problem while still using Google Drive by not only ensuring set wb = nothing, but also checking that
Application.EnableEvents = True when the files were programmatically closed.
Hope this helps someone - as the above helped me
我知道这是一个老话题,但我也发生了同样的事情,但这并不是因为同样的问题。
就我而言,问题是 Microsoft Data Streamer for Excel 加载项 - 一旦我停用它,当工作簿关闭时,项目就会从 VBA 中消失。
I know this is an old topic but I had the same thing happening but it wasn't because of the same issue.
In my case the problem was the Microsoft Data Streamer for Excel add-in - once I deactivated it the projects disappeared from VBA when it's workbook was closed.
我通过重新启动电脑成功删除了所有未使用的项目。
其他技巧,例如 Set Excel_workbook = Nothing 或 .Close 只会让事情变得更糟。
I managed to remove all unused projects by restarting my PC.
Other tricks, like Set Excel_workbook = Nothing, or .Close only made things worse.