Run-time Error ‘-2147467259 (80004005)'

D

DeanH

Several days ago I received and opened a .xls file, which obviously had
macros installed that totally changed the menus and toolbars. I closed this
down without doing anything else, but the next time and everytime since my
File menu, Standard and Formatting toolbars were changed. I have customised
the toolbars and menus back to how I want them but I still have the following
problem.

Upon opening Excel I get the following error:

Microsoft Visual Basic
Run-time error ‘-2147467259 (80004005)’:
method ‘BeginGroup’ of object’ _CommandBarButton’ failed.

If I debug the following script is highlighted:

CMenuFichier.Controls.Item(14).BeginGroup = True

Does anyone now how I can correct this, so I don’t get this error everytime
I open Excel?
 
N

Nick Hodge

Dean

Try opening Tools>Add-ins... and uncheck all the add-ins, close and re-start
Excel. If this works, add them back until the error re-appears, re-starting
each time you add one back.

If this isn't the case, try looking in xlStart and see if there is anything
there. (You should only have personal.xls, book.xlt and sheet.xlt...OR
nothing!). Move anything in here (don't delete it) and see if your issue
goes away.

Come back if you still have issues

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
www.nickhodge.co.uk
 
D

DeanH

Many thanks for your reply, Nick. I have made a note of your suggestion for
the future.
Just as you were writing your reply, I found the problem.
There was mysterious Toolbar on the Customize Toolbars listing, the toolbar
itself being blank. This obviously was left behind after the macro, from the
file I previously mentioned, did not clean up behind itself. When this
toolbar was deleted, the error and all the toolbar problems went away like
magic.
A lesson here, when creating a macro, always tidy up properly afterwards.

Many thanks again
DeanH
 
Top