Alt Code display under VBA

dcanham

Active Member
Joined
Jun 7, 2006
Messages
306
I'm not sure if it is possible, but is there a way to display the 'alt' set of graphic symbols in a cell using VBA? Like holding down the alt key and hitting '3' on the numeric keypad will give you a heart symbol. I can cause the symbols to display in the cell if I type it manually, just looking for a way to do it under program control. Thanks for any help.

-Dan
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Dan,

Since I'm using a Japanese version, holding down the alt key and hitting '3' doesn't work.
But I think there is a way to know the code of the heart symbol.
(I couldn't test it , so this is what I just guessed.)

Assume heart symbol is "h"

In the immediate window, type the following code then press Enter will return 104.
It's the character code of h.

Debug.Print Asc("h")

So you can describe the text or heart symbol with using this character code like this.

Debug.Print Chr("104")

If this dosn't work, an appropriate Font should be set.
 
Upvote 0

Forum statistics

Threads
1,223,153
Messages
6,170,395
Members
452,324
Latest member
stuart1980

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