1
votes

I am using Excel 2010.
When I close a workbook through the UI, or even through the workbooks(name_of_workbook).close method, the workbook remains in the VBA editor as a project.

Why is this? Is there a way to remove closed workbooks from the VBA editor?

1
Is your workbook an addin? Is it referred (using references) by any other open workbooks in VBA?shahkalpesh
No, it's just a standard workbook. However, I have encountered a similar situation with workbooks that refer to another open workbook through VBA references.Harry
Please check references of the other open workbooks. It could be a case where an existing open workbook (or addin) is referring to this workbook.shahkalpesh
I am positive there are no references in these workbooks to other workbooks through VBA.Harry
Similar thread... closing a workbook, then reopening the same workbook produces 2 listings in the VBA project listings; even though they are the same file.Harry

1 Answers

1
votes

I think I may have an answer. I have two VBA add-ins open as well, the Smart Indenter and VBA MZ-Tools. I tried opening and closing a workbook on a machine where these are not loaded (both add-ins require some registry tweaking to load properly on our machines) and I didn't encounter the issue.