## 6.1.3.1 How do you customize a tab in the Ribbon?
You can arrange, add or hide groups or commands as needed in the tabs of the Ribbon.
##  Note
To see how you can customize the Ribbon, check out this how-to video (produced for version 2.4): https:/ / youtu.be/X1jXGF8NiFs
##  Tip
You can quickly search for every occurrence of a specific word or phrase, by entering the text that you want to find in the upper-right part of the window. Any instances of the found text are highlighted in yellow.
## Arrange
To arrange the groups or commands of a tab, you can do the following:
- Use the buttons Move Up , Move Down and Move to Group .
##  Note
Using the Move Up and Move Down buttons, you can move the elements only inside a node element. Using the Move to Group button, you can move an element only into a first-level element.
- Use the drag-and-drop to move an element inside or outside a node element, and into any level.
## Show or hide
- To hide or display all the groups and elements of a tab, use the Show / Hide all Elements .
- To hide or display all the sub-elements of a group or an element, select the group or element, then right click and use the commands Show all Elements of and Hide all Elements of .
- Select or deselect the checkboxes in the tree view.
## Add
You can create new tabs.
You can create the following in a tab:
- new groups
- inside a group you have created, you can create the following types of elements: menu, separator, button, split button, or toggle button.
## How do you do it?
To create or delete new tabs, use the New Tab button (or the tab with the + icon) and the Delete Tab button. You can enter a name for a new tab and specify where to position it, before or after an existing tab (amongst the tabs that are natively delivered with Microsoft Excel).
To create or delete the groups or elements, use the New Group , New Sub-Element , Delete buttons or the same commands that you access from the context menu in the tree view of the tab.
## What elements can you create?
Here is the list of elements you can create, with their properties (that are explained below).
- Menu: label, size of the icon, icon.
- Separator: no properties.
- Button: identifier, label, macro, image size, image.
- Split button: identifier, label, macro, image size, image.
- Toggle button: identifier, label, macro (for the action), macro for the state of the button (pressed or not), image size, image.
## What are the possible properties of the elements you create?
- Label: enter the name of the element as it will appear on the interface.
- Image: choose the image that you want to be displayed next to the label. The images are stored within the profile xml.
- Image size: choose the size Normal or Large , depending on the type of element and available user interface space. If you are creating a group, choose Large . If you are creating another element, choose Normal .
- Get Button State: macro that sets the state of the toggle button, pressed or not.
- Macro: see below the Macro section.
- Display ID: see below the ID section.
## IDs
For buttons, split buttons, and toggle buttons, you can display and modify the automatically generated ID.
##  Caution
Once you have changed an ID, the original ID is overwritten, which means that you cannot reset it to the automatically generated ID.
To display an ID, select the option Display ID .
To modify an ID, select the option, then modify it in the row ID .
Here are the syntax rules for an ID : must be unique, must not contain colons, must start with either a letter or underscore (\_) and may contain only letters, digits, underscores (\_), hyphens (-), and periods (.).
##  Note
You can use the IDs to create VBA root macros.
##  Caution
As of version 2.5, macros with IRibbonControl are available. If you have defined macros in an earlier version of Analysis, you need to add the control of type IRibbonControl as the first parameter in each macro so that the macros function in version 2.5.
## Macros
For buttons, split buttons, and toggle buttons, you call VBA macros to perform the actions.
A macro can be defined in either one of the following:
- In an .xlam file that you need to enable as an add-in to Microsoft Excel. In this case, in the Macro area, enter the name of the file, followed by ! and then by the name of the macro that you want to call. For example: functions.xlam!opendocument
- Directly in the current workbook. In this case, you simply enter the name of the macro in the Macro area. For example: opendocument
Even if you do not use it, the first parameter must be the control of type IRibbonControl.
## Example of macro for a button action:
```
 Sample Code Sub MacroName(control As IRibbonControl) 'You can check control.ID 'Do whatever you need depending on the control Identifier End Sub
```
## Example of macro for a toggle button action:
##  Note
A macro for a toggle button action has a boolean parameter as the second parameter (the first parameter being IRibbonControl), which corresponds to the state of the button (pressed or not pressed).
## 
```
Sample Code Sub MacroName(control As IRibbonControl, pressed As Boolean) 'You can check control.ID 'Do whatever you need depending on the control Identifier End Sub
```
## Example of macro for the state of a toggle button:
```
 Sample Code Function MacroName(control As IRibbonControl) As Boolean 'You can check control.ID 'Evaluate pressed state as boolean MacroName = <pressed state as boolean> End Function
```