Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Command bars
I have an add-in that uses:
Set MenuObject = Application.CommandBars(1). _ Controls.Add(Type:=msoControlPopup, _ Befo=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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Command bars
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) wrote in message oups.com... I have an add-in that uses: Set MenuObject = Application.CommandBars(1). _ Controls.Add(Type:=msoControlPopup, _ Befo=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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Command bars
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Command bars
If, for any reason, the worksheet menu bar is protected you will get this
error. You might add this code just before yours: Application.CommandBars(1).Protection = msoBarNoProtection Of course there may be some other reason for the problem. -- Jim wrote in message oups.com... | 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. | |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 Command bars
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
URGENT HELP REQUIRED - EXCEL LOADS WITHOUT ANY COMMAND BARS AN | Excel Discussion (Misc queries) | |||
VSTO 2003 Excel Command Bars | Excel Programming | |||
Disable Excel Command Bars and Remove Irritating Grey Bar | Excel Programming | |||
Hide all Excel tool/command bars except mine and reload on close | Excel Programming | |||
Minimize/Maximize excel restores command bars | Excel Programming |