I did a program that I wished to distribute to my co-workers, they are not VBA oriented. So I wish to distribute it easily.
I created an Add-in, when install the add-in needs to create a custom Ribbon. I tried my best, but I cannot find easy to understand documentation.
My code is as follow :
Private Sub Workbook_AddinInstall()
On Error Resume Next 'Just in case
Application.CommandBars("Worksheet Menu Bar").Controls("Super Code").Delete
Set cControl = Application.CommandBars("Worksheet Menu Bar").Controls.Add
With cControl
.Caption = "Open SCF workbook"
.Style = msoButtonIconAndCaptionBelow
.OnAction = "OpenTheCorrectFile"
.FaceId = 7720
.DescriptionText = "Open the SCF workbook"
End With
Set cControl = Application.CommandBars("Worksheet Menu Bar").Controls.Add
With cControl
.Caption = "Are they onboard"
.Style = msoButtonIconAndCaptionBelow
.FaceId = 5817
.OnAction = "Check_Suppliers_Already_On_Board"
.DescriptionText = "Check if suppliers have already been on boarded"
End With
End Sub
Now if you use my code you will notice that:
- Buttons are small
- Icons are small
- No description when hoovering them
- No special name for the new ribbon, it is call Add-ins
- No special name for this group, it is call "Menu Commands"
Does anyone know how to solve this. Whenever I am looking for those answer people are using special application to create the ribbons, I do not wish to do it. I am also a beginner in VBA, so everything that is easily digestible is welcome.
Thank you very much.