assign a symbol to a shortcut key

G

Guest

Does anybody know, how I may assign a symbol to a shortcut key in XL?
I'd like to insert the check mark symbol (Wingding character code 252) to a
key combination. Any suggestions are highly appreciated.

Greetings,
 
G

Guest

Open the VBA editor (ALT+F11), find your desired workbook in the left pane.
Right click and select Insert>Module. A new window opens on the right hand
pane. In this new window, place this code:

Sub checkmark1()
With Selection.Font
.Name = "Marlett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveCell.FormulaR1C1 = "a"
End Sub

Close the VBA session (ALT+F4)

In your sheet, press ALT+F8. In the window that opens, find and highlight
the macro named 'checkmark1' and click Options. Assign your desired
keystroke to use to activate this macro (note: it must be a letter).

With the cell pointer in your desired cell, press ALT+(your selection) to
enter the 'checkmark'.

Note that I used the letter "a" in the Marlette font, as I couldn't find the
keystroke for WingDings. You may adjust the code above if you have that
information.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top