首页 文章

VBA项目资源管理器仍然显示由宏关闭的excel工作簿

提问于
浏览
8

我创建了一个宏来打开一个excel工作簿并执行一些操作,然后最后它关闭文件 . 宏运行正常 .

现在,当我在vba编辑器中打开我的VBA Project explorer时 . 它显示宏已打开的文件列表,即使它们已关闭 . 如何从项目资源管理器窗口中删除它们?为什么它仍然显示已经关闭的excel工作簿?无论如何要解决它或它的限制?

1 回答

  • 16

    我找到答案我很遗憾在这里浪费一些空间 . 我要求关闭这些或删除这些帖子,如果你认为它不是必要的谢谢!

    Dim Excel_workbook as excel.workbook
       set Excel_workbook = workbooks.open("somefile name");
       ' some code goes here 
       ' at the end write the below statement
       set Excel_workbook = Nothing 'worked, I found at the 12 page of google search
    

    这是帮助我的链接http://www.mrexcel.com/forum/showthread.php?t=50086

相关问题