Using '&' symbol in RibbonX

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
305
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm creating a custom tab in my Excel workbook, using the Office RibbonX Editor.

For the buttons that will be on my tab, I am using supertip to show a description of what the button does, if the user hovers over the button. In the text I want to appear, a character that I want in the string is the '&' symbol.

Unfortunately, when I validate my code in the RibbonX Editor, it is giving me an error at that place in the code. If I remove the '&' symbol it works fine, so obviously that is the culprit. I really want to keep the '&' symbol in there, because that symbol appears in headers in my workbook. Does anyone know how to use the '&' symbol in a string in the RibbonX Editor?

Here is the code I'm using:

<button id="ReplaceValues"
screentip="Replace Values"
supertip="This will allow you to replace specific values for R&D and Contractor."
label="Replace Values"
size ="large"
onAction="ReplaceValuesButton_RibbonX"
image="replacevalues_icon" />

</button>
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I am not sure why the code is displaying that way. I used the normal way to do the CODE block. I even tried it with two different browsers, and it did it this way both times.
 
Last edited:
Upvote 0
I finally figured it out. Instead of "&", I had to use "&" and then "amp" and then ";"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top