0
votes

I am making a ribbon for my office. I have programmed all the macros already, except for the icons. In the UI Editor, I have set everything to be done via a callback in VBA.

I have loaded all the icons using the MS Excel stock icons, however I have 9 icons that have to be added as they are not part of the excel standards.

I can't use different icons as the buttons in the ribbon paste the pictures that I need to display as the icons.

In the UI editor, I have set it up that all the buttons use "getimage=getimage" and have programmed a callback in VBA.

I don't seem to be able to change the 9 specific buttons to "image=pic1" and use the icons (pic1-pic9) I have loaded in the UI Editor. When I try to do that, I get an error saying "the 'Image' attribute is not declared"

So now I am looking for a workaround in VBA.

Current callback code for a standard Icon:

Case "eButton03": RibbonImage = "ObjectPictureFill"

I need the code above to pull in a picture instead of using the standard icon. let's say the picture is saved in C:\Pic\Pic1.png

1
image is a valid attribute for a button. How and where are you using it?Rory
I think it might be because I am using getimage for other buttons. Microsoft help says that the two are mutually exclusive, though I am not sure if that applies to a particular line, or if it applies to the entire code.Jon-Luke Marais
Protip: put the relevant code/markup in the post itself, not in comments underneath. See editing help for help with formatting.Mathieu Guindon
It's image not Image.Rory
yeah - XML is case-sensitive! :)Rory

1 Answers

0
votes

Use this list: https://bert-toolkit.com/imagemso-list.html You can also use or create custom images, add your picture "yourpic.png" via Excel's "Insert Icons" option in the Custom UI Editor. Use the code

image="yourpic"

To use your picture as a custom icon.