Excel中VBA项目没有得到关闭 [英] Excel VBA project not getting closed

查看:535
本文介绍了Excel中VBA项目没有得到关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个COM插件中,我处理Excel事件。我点击 Alt键F11 来查看与一个Excel VBA项目。然而,当我关闭该工作簿中的Project Explorer中的Excel VBA项目未关闭为好。

I have a COM addin in which I am handling excel events. I click Alt F11 to view the VBA project related to an excel. However, when I close the workbook the Excel VBA project in the project explorer is not closed as well.

未安装我的COM插件时,它得到正常关闭。这是怎么回事,和我应该怎样做不同?

It gets closed normally when my COM addin is not installed. What is going on, and what should I do differently?

推荐答案

的问题是残留在记忆工作簿中的对象。 。通过清除在工作簿中的对象禁用事件,当我关闭工作簿中的VBA项目变得越来越封闭

The problem was with workbook objects remaining in the memory. By clearing the objects in the workbook deactivate event, the VBA project is getting closed when I close the workbook.

请参阅本:
http://social.msdn.microsoft.com/Forums / EN-US / VSTO /线程/ 377fbebc-021d-4e48-aaef-d4658cc221b3

感谢

这篇关于Excel中VBA项目没有得到关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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