Solved

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

Posted on 2013-10-22
9
2,539 Views
Last Modified: 2013-10-22
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
Comment
Question by:bearblack
  • 5
  • 3
9 Comments
 
LVL 33

Expert Comment

by:Norie
ID: 39591316
Try refreshing the window by closing the VBE and then opening it again.

That usually works for me.
0
 
LVL 81

Expert Comment

by:byundt
ID: 39591331
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
 
LVL 2

Author Comment

by:bearblack
ID: 39592672
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 2

Author Comment

by:bearblack
ID: 39592678
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
 
LVL 81

Expert Comment

by:byundt
ID: 39592830
Did you try the test with trying to make the window of the closed workbook visible?
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39592860
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
 
LVL 2

Author Comment

by:bearblack
ID: 39592899
Error Message
This is the error I recieved when entering it into the immediate window:

Windows("Book10").Visible = True
0
 
LVL 2

Author Comment

by:bearblack
ID: 39592914
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
 
LVL 2

Author Closing Comment

by:bearblack
ID: 39592916
Thank you for the help I would have never thought an add-in would be causing this issue.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Finding a closest match in Excel 7 41
Word and Excel 2013 - Disabled Items List 3 55
VBA copy column paste as value 5 21
Excel VBA 4 26
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question