Excel 2003 Command bars

C

charlieguthrie

I have an add-in that uses:

Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=PositionOrMacro, _
Temporary:=True)
MenuObject.Caption = Caption

to create a new menu item. It works fine on 98% of our supposedly
identical machines but on the other 2% it will not run. I've seen
"Detect and Repair" occasionally fix the problem but not on all
machines. Anyone know what's going on and how to fix it?
 
C

Chip Pearson

What happens when it "will not run"? Error messages? Nothing happening?
Details count.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
C

charlieguthrie

The error message I get is:

Run-Time Error '-2147467259 (80004005)' Method 'Add' of object
'CommandBarControls' failed.

You can either End the macro or go to Debug mode.

Is there anything else I can provide to help in diagnosing the issue.
As a reminder, the exact same code is in production on roughly 100
machines with no issues.
 
C

charlieguthrie

Problem solved. The user had a corrupted profile, i.e. the folder c:
\documents and settings\<user id>\Application Data did not exist.
Logging on an as admin, renaming the user's old profile and having the
user log on (which causes a new profile to be created) solved the
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top