

Now let’s go ahead and create an add-in out of this code. Note: If you are recording a macro, Excel automatically takes care of inserting a module and putting the code in it.

Press Alt+F11 to go back to the Excel Worksheet.Double-click on the module and enter the above code (copy-paste it).Go to Insert option and click on ‘Module’. Right-click on any of the objects in the workbook.If you can’t see that, go to View –> Project Explorer. In the VB Editor, you would see the workbook objects listed in the project explorer.

Press Alt + F11 to open the VB Editor Window.If you are writing code (or copy-pasting it from somewhere), here are steps: In this example, we will use a simple code to highlight all the cells that have error values: Sub HighlightErrors() Selection.SpecialCells(xlCellTypeFormulas, xlErrors).Select = vbRed End Sub Add the macro to the Quick Access Toolbar.There are three steps to create an add-in and make it available in the QAT. In this tutorial, you’ll learn how to create an Excel add-in.
