Load characters into a character array.

Engineer Joe

Well-known Member
Joined
Jun 10, 2005
Messages
549
I'm making a string array to reference for a combo box in a user form. It should be this:

Array("=","<",">","≥","≤")

However, if you'll notice, the last two characters (≥ and ≤) won't go into the array in the vbe. A simple copy/paste into the vbe yields last two characters as equal signs (=), just try it.

Furthermore, the ASCII code for ≥ is ALT+242, but entering that directly into the vbe also yields the equal sign. So the question is, how do i load these characters into the array above when the vbe simply doesn't recognize them?

Thanks in advance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Those symbols are not part of the normal ASCII range (that is, non-Unicode range) of most fonts. However, I have a Symbol font on my system (which I believe is standard for all Windows operatiing systems) which does support those characters in the normal ASCII range. So, go to the Properties window for you ComboBox and change its font name to Symbol, then use this code line to assign the symbols to its item list...

Code:
ComboBox1.List = Array("=", "<", ">", "£", "³")
Yes, the last two characters will look wrong, but they will have the correct ASCII code of the symbols you want in the Symbol font.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,550
Members
452,927
Latest member
rows and columns

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