troubleshooting Question

Set treeView_PopupMenu suddenly failed (vba); cured by re starting windows7. Nasty shock - seek advice re explanation/prevention.

Avatar of Kelvin4
Kelvin4 asked on
Microsoft OfficeWindows 7VBA
7 Comments1 Solution53 ViewsLast Modified:

In Excel 2010, I have recently built my first TreeView popup menu which enables procedures to be called when right clicking a tv node from a UserForm TreeView control. All was going fine ...

... Suddenly, earlier file versions (that worked well on previous days)  FAILED at the following step:

Set treeView_PopupMenu = Application.CommandBars.Add(name:="UserForm1Popup", _
                                                 Position:=msoBarPopup, _

Blood running cold - I re-started Windows 7 - and the problem disappeared.  
I have no clues re the failure, but does the evidence suggest the cause was outside the excel piece?

Has anyone had this experience? My piece is intended for distribution. I hope to understand what happened, to head-off the problem if possible, or arrange for a less disconcerting crash.

Can I do better than put in an error trap that directs the user to restart the computer?

I have continual AVG anti-viral cover. I carry our occasional checks with SuperAntiSpyware  (, but it was not on when this occurred.

I had to restart my PC yesterday because my old Logitech cordless mouse failed to drive the cursor (though it had a new battery).

The machine is not used for games/ TV, just work. My browser is google chrome.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros