We help IT Professionals succeed at work.
Get Started

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

Kelvin4 asked
Last Modified: 2016-03-04

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  (http://www.superantispyware.com/downloadfile.html?productid=SUPERANTISPYWAREFREE), 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.

Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE