0

I ran into a strange behavior of a built-in function SymbolInsert. Cell font is Arial. In SymbolInsert I select font Wingdings,then I select and paste the symbol, and get out of SymbolInsert. After moving to the next cell i get the following result. If the selected character belongs to a range of literal characters, then the cell with the character changes the font to Wingdings, what is the expected result. However, if the selected character Wingdings is located in the place where regular fonts have numbers, then the cell font is reset to Arial. I have Excel version 2104 build 13929.20254. How to fix this behavior so that for all characters SymbolInsert are set to the font selected in SymbolInsert.enter image description here

Run the macro,

With Application
        .CommandBars.ExecuteMso "SymbolInsert"
        .SendKeys "{TAB}", True
End With

in the SymbolInsert window that appears, select the WingDings font, then select a symbol with a CaracterCode in the range 48-57, paste it into the sheet, and close the SymbolInsert window. After closing the window, the cursor is in the cell with the symbol and so far everything is fine. After leaving the cell, the font will be reset to the font that the cell had before the characterInsert function was called.

I searched, but unfortunately I did not find anything on the Internet

iFuraon
  • 11
  • 2
  • I cannot reproduce your problem using symbols with code values of 33 (lowest possible), 81 (equivalent to `Q`), or 255 (highest possible). Please explain your problem more clearly. Are you looking in the cell? Or perhaps in the formula bar *(you won't see the wingding font in the formula bar, only in the cell)*. – Ron Rosenfeld Jan 16 '23 at 14:52

1 Answers1

0

So far I have achieved what I wanted with the help of such a macro:

With Application
.CommandBars.ExecuteMso "SymbolInsert"
.SendKeys "{HOME}'{TAB}", True
DoEvents
.ActiveCell.Offset(0, -1).Select
.ActiveCell.Value = Mid(.ActiveCell.Value, 1, 1)

End With

I understand that this is a crutch, but maybe there is a more elegant solution

iFuraon
  • 11
  • 2