We'll first create a Excel file with a custom ribbon and then add the VBA code to build the Add-in.
-
Create a blank workbook in Excel, disable the autosave mode, and save it with the name
vba-pump-performance.xlsm
. -
Add a .zip extension to the document file name and then open the file.
-
Add the customization files to the containner by dragging the folder
customUI
to the .zip file. -
Extract the _rels folder to your desktop. Open it and edit the .rels file. Add the following line between the last Relationship tag and the Relationships tag. This creates a relationship between the document file and the customization file:
<Relationship Id="pump-performance" Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility" Target="customUI/customUI.xml"/>
-
Close and save the file. Add the .rels file back to the container file by dragging it from the desktop, overwriting the existing file.
-
Rename the document file to its original name by removing the .zip extension.
-
Open the document, probably the Excel will return the folowing message:
Click "Yes" and notice that the ribbon now displays the
Pump Performance
tab. -
Save the document, the Excel will display the message:
Click OK and the custom component ready!
-
Open the recently created
vba-pump-performance.xlsm
. -
Through the developer tab, access Visual Basic and import the script
00 - ImportModules.bas
. -
Run the sub and when asked by the dialog system, select the folder
vba-pump-performance\src
.