Every once in a wail I get to do some special tasks that are out of my regular scope.
For the last few weeks I’ve got involved in an Excel project.
The initial description of the was very simple, the user has built the excel correctly as to his needs and my tasks are:
- Write an installation manual.
(The file depends on two external add-ons) - Re-arrange the file so it will be more readable to the user.
- Re-arrange the macros that the user has recorded into fewer containers.
- Re-write the macros as VBA Code.
This post will not tell the story of all the above tasks but rather the story of one of the “side dishes” that I have found.
When I have worked on the users excel file, I have noticed that he is activating his macros by clicking on shapes that were converted into button with attached macros to it.
My first upgrade was to replace these “in Sheet” buttons with ribbons buttons, I did it using the default (build in) process of adding buttons to excel and attaching a macro to it.
https://support.microsoft.com/en-us/office/assign-a-macro-to-a-button-728c83ec-61d0-40bd-b6ba-927f84eb5d2c?ui=en-us&rs=en-us&ad=us
After some time I have noticed that whenever I’m moving (or re-naming) the file my ribbons buttons stops working.
(I have added at the end an explanation as to why did the buttons stopped working and what is the real propose of this process)
Back to the drawing board, or more like back to Google, and after some more research I found what should I do if I want to add ribbon button that will be part of an excel file.
The process is explained the following link:
http://www.rondebruin.nl/win/s2/win001.htm
The download link for the tool is:
https://github.com/fernandreu/office-ribbonx-editor/releases/tag/v1.6
The download link for the example of the XML codes is:
http://www.rondebruin.nl/win/s2/win003.htm
The original intention.
When working with excel, usually, we will want to expend the excel functionality with some personal addons, macros ect.
We will want these macros to be available for us with all files we will open with our excel.
We will get this by writing all of our addons into xlsm file(s) and reference it to our excel environment
https://support.office.com/en-us/article/add-or-remove-add-ins-in-excel-0af570c4-5cf3-4fa9-9b88-403625a0b460