Resolve the GetCustomUI for RibbonID Microsoft.Excel.Workbook Error

Custom UI Runtime Error in Visual Studio Tools for Office Design-Time Adaptor for Excel

This error drove me crazy because I could only find pieces of the answer, but never the whole answer.  Here’s the whole answer that resolved the problem for me.

The Error: The Call to GetCustomUI() for RibbonID “Microsoft.Excel.Workbook” failed.

GetCustomUI_error_Dialog

It typically comes up after an installation of Microsoft Office and Visual Studio.  Somehow the combination of these two causes the problem and Microsoft hasn’t figured out why, or how.  There is a workaround.

Step 1: Open Excel in Administrator mode

There are two ways to do this.

A) Right click on the Excel shortcut and click on Properties in the context menu. In the properties dialogue click the Advanced button. In the Advanced Properties dialogue check off “Run as Administrator” and click OK on all the open dialogues.

B) Click the Start Button, or the Windows button.  Type Excel in the search box.  Press SHIFT + CTRL + Enter

Open a blank workbook

Step 2: Activate the Developer Tab in the Ribbon if isn’t availableCustomize_the_Ribbon

In the workbook file menu select “Options” and in the Options menu select “Customize Ribbon”.

In the right hand list of the Ribbon Customizer you should see a list of tabs.  Make sure the “Developer” tab is selected.

Click OK to close the Customizer

Step 3: Turn off the “Visual Studio Tools for Office Design-Time Adaptor for Excel”

In the Ribbon select the Developer tab.com_Addin

In the Developer tab select the “COM Add-Ins”

In the COM Add-Ins dialogue look for the “Visual Studio Tools of Office Design-Time Adaptor for Excel” add in.  You’ll likely see one for every version of Visual Studio that you’ve installed on this particular machine. Uncheck all of them and click OK out of the dialogue

Com_Add_in_Dialogue

That should immediately resolve the problem.

Once you open Excel in non-Administrator mode you might encounter the problem again.  If that’s the case follow the above steps without opening Excel as an Administrator.

27 comments for “Resolve the GetCustomUI for RibbonID Microsoft.Excel.Workbook Error

Leave a Reply to Rafael Barros Cancel reply

Your email address will not be published. Required fields are marked *