• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3373
  • Last Modified:

Why does Project Explorer in the Excel VBA Editor still show closed workbooks?

How can I set the Project explorer to only show the sheets I have open instead of showing all workbooks I have opened and closed in a given Excel session? As you can tell many are duplicated several times when I open, close, and then reopen them within the same session.

Excel Project Explorer
0
bearblack
Asked:
bearblack
  • 5
  • 3
1 Solution
 
NorieCommented:
Try refreshing the window by closing the VBE and then opening it again.

That usually works for me.
0
 
byundtCommented:
Are you saying that Book10 in the above screenshot is closed, yet still shows up in the VBA Project Explorer? On my computer, closed workbooks disappear from the Project Explorer.

Workbooks in hidden windows will still be listed in the Project Explorer. To test whether the workbooks might be in a hidden window rather than closed, try entering a statement in the Immediate Pane like
?Workbooks.Count      

If the preceding statement shows a count that differs from your expectations, then you can try displaying one of the hidden workbooks with the following statement in the Immediate Pane:
Windows("Book10").Visible = True
0
 
bearblackAuthor Commented:
It shows the correct number of workbooks open (2) so it is still showing closed workbooks. I have also closed VBE and reopened still shows the same.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bearblackAuthor Commented:
The only way to clear it is to totally close excel and then reopen Excel but that is a pain and counterproductive. There must be a setting somewhere that is making it hold the session history but I can't find it.
0
 
byundtCommented:
Did you try the test with trying to make the window of the closed workbook visible?
0
 
byundtCommented:
One person reported a similar problem, and cured it by deactivating "Acrobat PDFMaker Office COM Addin".  This is an old Mr. Excel thread, but the cure was posted in December 2012.

Microsoft Excel MVP Chip Pearson reported that Google Desktop was known to produce similar behavior (closed workbooks remaining in Project Explorer) in 2005

The conclusion I draw from the above reports is that buggy add-ins can wreak havoc with the Project Explorer in Excel VBA. Even if you don't have the two add-ins in question, try deactivating all add-ins to see if that fixes the problem. If so, you can load your add-ins back one at a time to identify which one is causing the problem.
0
 
bearblackAuthor Commented:
Error Message
This is the error I recieved when entering it into the immediate window:

Windows("Book10").Visible = True
0
 
bearblackAuthor Commented:
An add-in was the issue but it was not the Acrobat PDFMaker. In my case, it was the "Easy-XL from MrExcel" add-in that was causing the issue.

Project Explorer is now working properly.

Thank you byundt and also to all the others that tried to help!
0
 
bearblackAuthor Commented:
Thank you for the help I would have never thought an add-in would be causing this issue.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now